Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
ACF Repeater Headlines
* ACF Repeater Field : headlines
* ACF Sub Field: headline (Post ID)
$posts = array();
if (have_rows('headlines')) {
while (have_rows('headlines')) {
array_push($posts, get_sub_field('headline'));
$args = array(
'post__in' => $posts,
'orderby' => 'post__in'
$the_query = new WP_Query($args);
while ($the_query->have_posts()) {
get_template_part('template-parts/content', 'headline');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.