/ Published in: PHP
URL: http://ditscheri.com/blog/deregister-css-and-js-files-from-all-in-one-event-calendar-plugin
Deregister All in One Event Calendar CSS so it's not on every page. Afterwards, add the CSS files directly to the calendar pages. This way they are only loaded when needed.
Expand |
Embed | Plain Text
// clean up unwanted JS scripts function my_print_scripts(){ if ( !is_admin() ) { wp_deregister_script('jquery'); wp_deregister_script('ai1ec_requirejs'); } } add_action('wp_print_scripts', 'my_print_scripts'); // clean up unwanted CSS function my_print_css() { if ( !is_admin() ) { wp_deregister_style('ai1ec-general'); wp_deregister_style('ai1ec-event'); wp_deregister_style('ai1ec-calendar'); } } add_action('wp_print_styles', 'my_print_css');
You need to login to post a comment.
