Timeline for ACF get field label in custom code
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 25, 2018 at 13:58 | vote | accept | sonja | ||
Jul 25, 2018 at 13:50 | answer | added | Sally CJ | timeline score: 1 | |
Jul 25, 2018 at 13:32 | comment | added | Sally CJ | Ok let me try to change the code for you.. | |
Jul 25, 2018 at 13:26 | comment | added | sonja | unfortunately when using get_field_objects() It displays only the word "Array" which is not what I want.. | |
Jul 25, 2018 at 13:14 | comment | added | Sally CJ |
Ah I see it now. I thought 'label' was a field. xD Use get_field_objects() and not get_fields() . =)
|
|
Jul 25, 2018 at 13:03 | comment | added | sonja | @SallyCJ hmm no it's not there! How do I get it? | |
Jul 25, 2018 at 12:54 | comment | added | Sally CJ |
Try adding var_dump($fields); after $fields = get_fields(); and check its output. Is there the label item?
|
|
Jul 25, 2018 at 12:50 | comment | added | sonja | @SallyCJ no, that'S not working either.. It results in: "Warning: Illegal string offset 'label' in..." | |
Jul 25, 2018 at 12:33 | comment | added | Sally CJ |
Maybe you meant $value['label'] and not $name['label'] ?
|
|
Jul 25, 2018 at 11:57 | history | edited | Fayaz | CC BY-SA 4.0 |
Cleanup, formatting, tag
|
Jul 25, 2018 at 11:52 | history | asked | sonja | CC BY-SA 4.0 |