Support

Home Forums Event Espresso Premium Pulling multiple categories with espresso_get_events

Pulling multiple categories with espresso_get_events

Posted: December 11, 2024 at 4:31 pm

Viewing 1 reply thread


wmnf

December 11, 2024 at 4:31 pm

We currently use the following to list events from one category. Is there a way to pull multiple categories, but not all?

$regular = espresso_get_events( array(
'show_expired' => false,
'order_by' => 'start_date',
'sort' => 'ASC',
'post__not_in' => $queried_events_ids,
'limit' => 8 - count( $events ),
'category_slug' => 'wmnf-events'
) );

array_push( $events, ...$regular );


wmnf

December 11, 2024 at 4:45 pm

Nevermind, I separated by commas and it works perfectly.

Viewing 1 reply thread

The support post ‘Pulling multiple categories with espresso_get_events’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso