Help displaying taxonomies in repeaters not just text strings [ACF and Elementor

[ad_1]

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;

}

&#x200B;

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer