Skip to content

Instantly share code, notes, and snippets.

@jo-snips
Created March 13, 2012 03:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jo-snips/2026611 to your computer and use it in GitHub Desktop.
Save jo-snips/2026611 to your computer and use it in GitHub Desktop.
The Events Calendar: Deregister/Register Scripts
add_action('wp_enqueue_scripts', 'example_enqueue_scripts');
function example_enqueue_scripts() {
wp_dequeue_script('tribe-events-calendar-script');
}
add_action('wp_footer', 'custom_events_script');
function custom_events_script() {
wp_register_script('tribe-custom-calendar-script', get_bloginfo('stylesheet_directory') .'/events/events.js', array('jquery'), '1.0', true); // see http://codex.wordpress.org/Function_Reference/wp_enqueue_script for full details
wp_print_scripts('tribe-custom-calendar-script');
}
@jessemezini
Copy link

Hello, how to load the events css only in pages i want ? i only use event calendar in a page inside my blog thx

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