Home › Forums › Add-ons › Repeater Field › Query repeater field with two values › Reply To: Query repeater field with two values
I am leaving a lot of stuff out because there’s way too much to paste here, but you get the idea.
<?php $author = 85; //get_query_var('author'); $images_query = new WP_Query([ 'suppress_filters' => FALSE, 'posts_per_page' => -1, 'post_type' => 'images', 'meta_query' => [ //'relation' => 'OR', //'relation' => 'AND', [ 'key' => 'authors_%_people', 'compare' => 'LIKE', 'value' => '"'.$author.'"', ], ], ]); ?> <div class="row grid"> <?php if( $images_query->have_posts() ) : while( $images_query->have_posts() ) : $images_query->the_post(); ?> <div id="<? the_ID() ?>" class="grid-item"> <?= wp_get_attachment_image( get_field('image')['ID'] ?> </div> <?php endwhile; endif; wp_reset_query() ?> </div>
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!
Are you building WordPress sites with ACF and @BeaverBuilder, and wanted to use your ACF Blocks in both the block editor and Beaver Builder?— Advanced Custom Fields (@wp_acf) May 10, 2023
The BB team recently added support for using ACF Blocks in Beaver Builder. Check it out 👇https://t.co/UalEIa5aQi
© 2023 Advanced Custom Fields.