daily pastebin goal
4%
SHARE
TWEET

Selectively dequeue Tribe stylesheet

BakerMan Feb 10th, 2014 99 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Run our function early on in the wp_head action
  3.  */
  4. add_action( 'wp_head', 'remove_tribe_theme_styles_for_single_events', 5 );
  5.  
  6. /**
  7.  * Check if it is a single event and remove the relevant stylesheet.
  8.  */
  9. function remove_tribe_theme_styles_for_single_events() {
  10.         global $wp_query;
  11.         if ( isset($wp_query->tribe_is_event) && $wp_query->tribe_is_event && $wp_query->is_singular )
  12.                 wp_dequeue_style( TribeEvents::POSTTYPE . '-calendar-style' );
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top