Skip to content

Instantly share code, notes, and snippets.

@jesseeproductions
Last active June 19, 2020 10:41
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jesseeproductions/e787d5dd5c0e943f172f to your computer and use it in GitHub Desktop.
Save jesseeproductions/e787d5dd5c0e943f172f to your computer and use it in GitHub Desktop.
Remove Ajax from The Events Calendar Pagination on Month, List, and Day Views
/*
* 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);
@dasmurphy
Copy link

This is awesome and helped me! Thanks for the snippet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment