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 } ?>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.