Events Manager
[resolved] How to disable javascript and CSS (1 post)

  1. Sebastien Couture
    Posted 2 years ago #

    This is a response to this post about disabling scripts in Event Manager: http://wordpress.org/support/topic/plugin-events-manager-how-to-disable-scripts

    With this function I was able to remove jQuery UI from the front and keep the base events-manager.js as well as the inline code which handles Ajax form submit etc.

    In this example, CSS files are also removed. Simply delete wp_dequeue_style if you wish to keep them.

    add_action('init', 'em_enqueue_fix', 20);
    function em_enqueue_fix() { 
    	if(!is_admin()) {
    		wp_dequeue_style('events-manager', plugins_url('events-manager/includes/css/events_manager.css'));
    		$eventsScripts = array(
    		wp_dequeue_script( $eventsScripts );
    		wp_deregister_script( $eventsScripts );
    		wp_enqueue_script('events-manager', plugins_url('events-manager/includes/js/events-manager.js'), 'jquery');


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic