Export Repeater field to single CDATA rows
-
Hi!
I’m struggling with displaying my ACF Repeater field into single CDATA rows.
This is what i would like to achieve:
<countries>
<![CDATA[ Botswana ]]>
<![CDATA[ Zimbabwe ]]>
</countries>Currently, it’s displaying like this:
<countries>
<![CDATA[ a:1:{s:4:”land”;s:17:”Botswana|Zimbabwe”;} ]]>
</countries>I’ve tried writing multiple functions:
<countries>
[my_output_items({Landen})]
</countries><?php function my_output_items( $landen ) { $pieces = explode("|", $landen); echo "value: " . $pieces[1] . " ]]>"; } ?>
This returns the following value (on top of the page):
value: Zimbabwe ]]>So, i feel like i’m getting there, but i really need some help to get further with this. Any advice is highly appreciated.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Export Repeater field to single CDATA rows’ is closed to new replies.