Support

Account

Home Forums Add-ons Repeater Field Trying to retrieve page objects in repeater Reply To: Trying to retrieve page objects in repeater

  • Ahhhh…I seem to have gotten it to work now. Your help was invaluable. Thanks you!

    if( have_rows('home', 'option') ):
    
    while ( have_rows('home', 'option') ) : the_row();
    
    $post_object = get_sub_field('choose_pages');
    
    if( $post_object ):
    
    $post = $post_object;
    setup_postdata( $post ); ?>
    
    <article class="px-content" id="chapter<?php echo the_ID(); ?>">
    	<div class="px-inner">
    		<div class="container-fluid">
    			<div class="row">
    				<div class="headline">
    					<h1><?php echo get_the_title($post->ID); ?></h1>
    					<p>content</p>
    				</div>
    			</div>
    		</div>
    	</div>
    </article>
    				
    <?php wp_reset_postdata();
    	
    	endif;
    
    endwhile;
    
    endif;