How to display acf repeater in tag archive page?

Question

I want to show some repeater fields on tag archive page.
with this code I can display the simple text fields of acf:

$term = get_queried_object();
$meta = get_field('test', $term);

but when want to output the acf repeater have no success.

$term = get_queried_object();
if (have_rows('faq', $term)) :
    while (have_rows('faq', $term)) : the_row();
        echo get_sub_field('question');
        echo get_sub_field('answer');
    endwhile;
endif;
0
Mohammad J 2 years 2020-12-23T10:11:20-05:00 0 Answers 8 views 0

Leave an answer

Browse
Browse