• Resolved James Mehorter

    (@jamesmehorter)


    Hello, We’re using the list feature of Events Manager, and noticed that wp_head() outputs 13 javascript files, 1 css files, and one script tag with javascript variables all from Events Manager. Most of the scripts are for jQuery UI. Given that we’re using the list view of EM, we don’t need these scripts and they are just adding to the page load/download time. How can we disable these scripts / force them not to display? Does EM have a DONT_PRINT_SCRIPTS constant similar to NextGen Gallery? We don’t want EM to output anything to wp_head().

    Thanks!

    https://www.ads-software.com/extend/plugins/events-manager/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    We don’t but you can use wp_dequeue_scripts to prevent any scripts from loading, or alternatively, you’d use this

    function my_em_scripts_function(){
      remove_action('init', array('EM_Scripts_and_Styles','public_enqueue'));
    }
    add_action('init','my_em_scripts_function',1000);
    Thread Starter James Mehorter

    (@jamesmehorter)

    Hi Marcus, thanks. Does that need to be customized at all? I just dropped that code in my functions.php and none of the EM scripts/styles are disappearing from the source. Thanks for your help with this!

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    i wrote this by hand, but in theory that should work.

    you may need to dig into this and play around with the above – events-manager.php – line 172

    Sorry for late input into resolved topic but I had this problem, came here and found a missing element.

    function my_em_scripts_function(){
      remove_action('wp_enqueue_scripts', array('EM_Scripts_and_Styles','public_enqueue'));
    }
    add_action('init','my_em_scripts_function',1000);
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Events Manager] EM Loadings Lots of Scripts to wp_head()’ is closed to new replies.