I have created a field group and within here I have created a faq accordion repeater. I am trying to print out the contents of this repeater on my website front end but having followed various tutorials online I can’t get this to work.
The code I am using is shown below. At present nothing is displayed. Can anyone help please?
// check if the repeater field has rows of data
// loop through the rows of data for the tab header
while ( have_rows(‘content_faqs’) ) : the_row();
$header = get_sub_field(‘faq_question’);
$content = get_sub_field(‘faq_answer’);
<button class=”accordion”><?php echo $header; ?></button>
<p><?php echo $content; ?></p>
endwhile; //End the loop
// no rows found