Ok I been hitting my head against the wall for over a day now… I got this to work with regular post types but I can’t make it work using the repeater add-on …
<?php $today = date("Ymd");?>
<?php $loop = new WP_Query( array(
'post_type' => 'reports',
'posts_per_page' => 5,
'meta_key' => 'date',
'meta_compare' => '>=',
'meta_value' => $today,
'orderby' => 'meta_value_num',
'order' => 'ASC'
) ); ?>
<?php while ($loop->have_rows('report_home') ) : $loop->the_row(); ?>
<?php the_sub_field('date'); ?>
<?php endwhile; ?>
I get the error Fatal error: Call to undefined method WP_Query::have_rows()
I been googling and googling and no luck =(
Ideas on how to get this to work?
I’m looking to do for the same… I presume tho that the meta_key we’re looking for is a nested object within each repeater row.
Hey Guys,
Same issue for me also, I got a code example using new date.
https://support.advancedcustomfields.com/forums/topic/acf-datepicker-within-an-acf-repeater-row-dates-not-post-unique/
Did anyone get a fix with this issue?
Many thanks,
Neil