I have an options page with group of a clone field of flexible content that I am trying to display on a custom post type archive.
Group = review_list_precontent
Clone = flexible_content_review_clone
Flexible Content = page_content
All I can get this code to display is <section></section> so I know its finding content but it just won’t display any row layouts.
(This is for a custom post type archive and I already have it working for the blog archive so I know the content in my page-content folder displays fine.)
<?php
if( have_rows('review_list_precontent', 'option' )):
while ( have_rows('review_list_precontent', 'option' )) : the_row();
the_sub_field('flexible_content_review_clone');
?>
<section>
<?php get_template_part('partials/page-content/'. get_row_layout());?>
</section>
<?php
endwhile;
endif;
?>
Nevermind I got this to work 🙂
<?php
if ( have_rows( 'review_list_precontent', 'option' ) ) :
while ( have_rows( 'review_list_precontent', 'option' ) ) : the_row();
if ( have_rows( 'page_content' ) ) :
while ( have_rows( 'page_content' ) ) : the_row();
?>
<section>
<?php get_template_part('partials/page-content/'. get_row_layout());?>
</section>
<?php
endwhile; endif;
endwhile; endif;
?>