Home › Forums › General Issues › Multi Select – Get all choices for Query Args › Reply To: Multi Select – Get all choices for Query Args
Hmm
// Variables
$number_of_events = get_field( 'number_of_events' );
// print_r($number_of_events);
$event_categories = get_field('event_categories');
$event_cat_ids = wp_list_pluck( $event_categories, 'term_id' );
#$event_cat_ids = array( 1, 31 );
$args = array(
'post_type' => 'event',
'post_status' => 'publish',
'posts_per_page' => $number_of_events,
'order' => 'DESC',
);
$args['tax_query'] = array(
'relation' => 'OR',
array(
'taxonomy' => 'event_category',
'field' => 'term_id',
'terms' => $event_cat_ids
),
);
$query = new WP_Query( $args );
if( $query->have_posts() ) :
while( $query->have_posts() ): $query->the_post(); ?>
<?php the_title(); ?>
<?php endwhile; wp_reset_postdata();
endif;
?>
does work now. Virtual 3 shows me `Event 4 Virtual Event 3 Virtual Event One Virtual
` Only display of block on page in editor is hidden all the time on save. Perhaps related to
Uncaught TypeError: Cannot read properties of null (reading 'addEventListener') at toggle.js?ver=5.8.1:7
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βre excited to announce we've released Composer support for installing ACF PRO.
— Advanced Custom Fields (@wp_acf) January 31, 2023
π #ComposerPHP fans rejoice!
β¨ Please see the release post for all the details and full instructions. https://t.co/ebEfp61nlR
© 2023 Advanced Custom Fields.
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.