Guest User

Tribe Events Global Conditional

a guest
Aug 23rd, 2013
3,886
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php function is_tribe_calendar() { } // detect if we're on an Events Calendar page ?>
  2.  
  3. <?php if (tribe_is_event() || tribe_is_event_category() || tribe_is_in_main_loop() || tribe_is_view() || 'tribe_events' == get_post_type() || is_singular( 'tribe_events' )) { ?>
  4.  
  5. //Do something if it's a Tribe Events Page
  6.  
  7. <?php } else { ?>
  8.  
  9. //Do something else if it's not a Tribe Events page
  10.  
  11. <?php } ?>
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×