Last active
April 8, 2024 16:22
-
-
Save BeardedGinger/7886729d4a8db2360e40 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$terms = array( 'citywide', 'central', 'east', 'west', 'seasonal' ); | |
foreach( $terms as $term ) { | |
$events = tribe_get_events( | |
array( | |
'posts_per_page' => 4, | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'tribe_events_cat', | |
'field' => 'slug', | |
'terms' => $term, | |
), | |
) | |
) | |
); | |
foreach( $events as $event ) { | |
// Add your event markup here example below | |
echo '<h2>'.$event->post_title.'</h2>' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment