Hiding specific event category from website homepage
-
Hi, guys. I am trying to exclude a specific category from displaying on the homepage of my website. The homepage currently displays anything from the ‘Upcoming Events’ category:
<?php global $post; $all_events = tribe_get_events( array( 'eventDisplay'=>'upcoming', 'posts_per_page'=>1, 'tax_query'=> array( array( 'taxonomy' => 'tribe_events_cat', 'field' => 'slug', 'terms' => 'upcoming-events' ) ) ) ); foreach($all_events as $post) { setup_postdata($post); ?>
However, my client wants to hide some events from the homepage but have them show up everywhere else. I created an Event Category called ‘Hidden Events’ which I want them to use to distinguish between the display options. So, if you select ‘Hidden Events’ the item will not show up on the homepage. I have done a lot of research on the code snippet to achieve this but I’m coming up blank. Can anyone assist? Thanks in advance.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Hiding specific event category from website homepage’ is closed to new replies.