Support

Account

Home Forums Front-end Issues Extracting Post Object data from within a Repeater Reply To: Extracting Post Object data from within a Repeater

  • that does not matter with the code i provided.. what it’ll do is loop through all repeaters and fetch the ssm_featured_page dropdowns value. But I guess that is an array then so you’ll do this (if you want it foolproof for multiple selects:

    
    
    <?php while (has_sub_field('ssm_featured_content')) { ?>
    
    	$postObjects = get_sub_field('ssm_featured_page');
    
    if($postObjects){
    foreach($postObjects as $post){
    setup_postdata($post);
    the_title();
    }
    wp_reset_postdata();
    }
    	
    	<?php echo $postObject->$post_title; ?>
    	
    	
    <?php } ?>