Remove Ajax from The Events Calendar Pagination on Month, List, and Day Views
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
/* | |
* Remove Ajax from The Events Calendar Pagination on Month, List, and Day Views | |
* @4.0.6 | |
* | |
*/ | |
function events_calendar_remove_scripts() { | |
if (!is_admin() && !in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) ) ) { | |
wp_dequeue_script( 'the-events-calendar'); | |
wp_dequeue_script( 'tribe-events-list'); | |
wp_dequeue_script( 'tribe-events-ajax-day'); | |
}} | |
add_action('wp_print_scripts', 'events_calendar_remove_scripts' , 10); | |
add_action('wp_footer', 'events_calendar_remove_scripts' , 10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is awesome and helped me! Thanks for the snippet.