Ive got a repeater to display in elementor via code snippets but the limitation is the code is not equipped to handle taxonomies. Ive got 2 repeaters set up, the first is the one I actually want to use and stores taxonomies, and the second was to test the code and stores text strings. The repeater that stores text strings works perfectly with the code I have, however if I run it with the first repeater it just displays “Array” for each input. How would I go about fixing this (if possible) so that the actual taxonomy is returned?
This is the code I am currently using.
add\_shortcode(‘show-required’, ‘dnlt\_show\_required’);
function dnlt\_show\_required() {
$pageID = get\_the\_ID(); // not required if within loop, but doesn’t hurt
$content = ”;
if (have\_rows(‘set\_1’, $pageID)) {
while (have\_rows(‘set\_1’, $pageID)) {
the\_row();
$content .= get\_sub\_field(‘song’) . ‘<br>’; // Use <br> for line breaks
}
}
return $content;
}
​
[ad_2]