Home › Forums › General Issues › How to convert field key to meta key › Reply To: How to convert field key to meta key
The question is, why are you trying to get the value using what you posted.
Here’s an explanation of
[field_5492be0701cb6] // field key of recipe_sections
[1] // row 1
[field_5492be5d01cb8] // field key of section_steps
[0] // row 0
[field_5492c04b01cbb] // field key of step_ingredients
[0] // row 0
[field_5492c13601cbf] // field key of quantity
You can convert the field key to the field name this way
$field = get_field_object($field_key);
$field_name = $field['name'];
Your field has 4 levels, a repeater or flex field, two nested repeaters or flex fields and whatever quantity is. ACF creates meta keys for repeaters like this:
"{$field_name}_{$row}_{$field_name}_{$row}_{$field_name}_{$row}_{$field_name}"
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.