get_post_meta in a repeater is returning the object, not the class as expected
-
Hi all,
So I am accessing the font awesome field that is in a repeater. I am accessing this data in a loop via a get_post_meta.
$sub_field_value_icon = get_post_meta(get_sub_field(“person”), $meta_key_icon, true);
This returns me the object and not the element as I have selected in the settings in ACF. Regardless of what I change that to, I keep getting the whole object, that looks like this on return.
{ “style” : “brands”, “id” : “linkedin”, “label” : “LinkedIn”, “unicode” : “f08c” }
I have used the plugin many times and had no problem accessing the class but I have also done so in a CPT WP Query and not in the get_post_meta…
What am I doing wrong here and how can I access the element. It looks like the class isn’t even in the object so I can’t even try and work with it.
Thanks for the help!
The page I need help with: [log in to see the link]
- The topic ‘get_post_meta in a repeater is returning the object, not the class as expected’ is closed to new replies.