Forked from ooobo/events-conditional-wrappers.php
Created
September 12, 2016 13:50
-
-
Save Archie22is/e6696327b13a36c346e6551cce47d840 to your computer and use it in GitHub Desktop.
The Events Calendar: Basic Conditional Wrappers
This file contains hidden or 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
add_action( 'wp_print_styles', 'deregister_styles', 100 ); | |
function deregister_styles() { | |
if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page | |
} elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages | |
} elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List | |
} elseif( tribe_is_event() && is_single() ) { // Single Events | |
} elseif( tribe_is_day() ) { // Single Event Days | |
} elseif( tribe_is_venue() ) { // Single Venues | |
} elseif( tribe_is_upcoming() || tribe_is_showing_all() || tribe_is_past() ) { | |
} | |
else { | |
wp_dequeue_script( 'tribe-events-pjax' ); | |
wp_dequeue_script( 'tribe-events-calendar-script' ); | |
wp_dequeue_style( 'tribe-events-calendar-style' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment