• I noticed that all my pages a bloated with em scripts (well, at least a healthy sample – I did not check all). My site is slow enough without the extra help. Any suggestions on how to prevent these scripts from injecting themselves in non-em pages?

    Thanks!

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    try settings under Events > Settings > General Option > Performance Optimization (Advanced)

    Thread Starter mirgcire

    (@mirgcire)

    I appreciate the quick response, but changing the “Limit JS file loading” and “Limit loading of our CSS file” settings to “yes” had NO effect. All the same EM code was loaded on all the pages I checked.

    Do you have a cache plugin active?

    Thread Starter mirgcire

    (@mirgcire)

    My hosting account provides a caching feature. I flushed the cache multiple times and checked the page source after each time. The result was no effect – the em javascript code was still there. The bulk of the code contains the signature: “qTip2 v2.0.0”

    • This reply was modified 7 years, 11 months ago by mirgcire.

    The bulk of the code contains the signature: “qTip2 v2.0.0”

    I’m not sure what you mean by that but, as far as I know, Events Manager contains nothing that mentions that.

    Can you post a link?

    Thread Starter mirgcire

    (@mirgcire)

    I greped for qTip2 and found it is in the pro package:

    Text found at ./wp-content/plugins/events-manager-pro/includes/js/events-manager-pro.js
    Text found at ./wp-content/plugins/events-manager-pro/events-manager-pro.php

    And it inside the same <style> node as a bunch of .em-whatever {css stuff}

    Are you running any custom templates / custom code related to Events Manager?

    Thread Starter mirgcire

    (@mirgcire)

    Can you tell me what a “custom template” is. I looked on this page and found nothing that fits that description.

    If it helps, I am using using the following filters.

    add_filter( ’em_ticket_is_available’, ‘els_ticket_is_available’, 10, 2);
    add_filter( ’em_bookings_is_open’, ‘els_bookings_always_open’, 10, 3);
    add_filter(’em_event_output_placeholder’,’els_output_placeholders’,1,3);
    add_filter(’em_gateway_booking_form_buttons’, ‘els_gateway_booking_form_buttons’, 10, 2);
    add_filter (’em_event_is_published’, ‘els_event_is_published’, 10, 2);
    add_filter (‘the_content’, ‘els_materials_only’, 12, 1);
    add_filter(’em_event_output_placeholder’,’my_em_styles_placeholders’,1,3);

    Try removing those and testing.

    Thread Starter mirgcire

    (@mirgcire)

    I removed them all and still see both js and css on all pages

    Example of js:

    <script type='text/javascript'>
    /* <![CDATA[ */
    var EM = {"ajaxurl":"http:\/\/sgtest.effectivechinese.net\/wp-admin\/admin-ajax.php","locationajaxurl":"http:\/\/sgtest.effectivechinese.net\/wp-admin\/admin-ajax.php?action=locations_search","firstDay":"0","locale":"en","dateFormat":"mm\/dd\/yy","ui_css":"http:\/\/sgtest.effectivechinese.net\/wp-content\/plugins\/events-manager\/includes\/css\/jquery-ui.min.css",

    Example of CSS:

    <style type="text/css">
    //some stuff ommitted ....
    		.em-cart-table th { background-color:#eee; text-align:center; }
    		.em-cart-table td { background-color:#fff; }
    		.em-cart-table th.em-cart-title-event { text-align:left; }
    		.em-cart-table tbody.em-cart-totals th { text-align:right; padding-right:20px; }
    		.em-cart-table .em-cart-table-details-hide { display:none; visibility:none; }
    		.em-cart-table .em-cart-table-event-details { display:none; visibility:none; }
    		.em-cart-table .em-cart-table-event-title { font-weight:bold; }
    		.em-cart-table .em-cart-table-spaces { text-align:center; }
    		.em-cart-table .em-cart-table-price, tbody.em-cart-totals td { text-align:right; }
    		.em-cart-table-event-details .em-cart-table-ticket { font-weight:bold; }
    		.em-cart-info .em-cart-info-title { text-decoration:underline; }
    		.em-cart-info .em-cart-info-booking-title { font-weight:bold; }
    		.em-cart-info .em-cart-info-values label { font-style:italic; display: inline-block; width:150px; }		 
    		/*! qTip2 v2.0.0 | https://craigsworks.com/projects/qtip2/ | Licensed MIT, GPL */#qtip-rcontainer{position:absolute;left:-28000px;top:-28000px;display:block;visibility:hidden}#qtip-rcontainer .ui-tooltip{display:block!important;visibility:hidden!important;position:static!important;float:left!important}.ui-tooltip,.qtip{position:absolute;left:-28000px;top:-

    Which version of Events Manager, EM Pro (if active) and WordPress are you using?

    Thread Starter mirgcire

    (@mirgcire)

    EM 5.6.6.1, EM pro 2.3.9

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘How to avoid enqueue-ing em scripts into all my pages’ is closed to new replies.