Title: css e js
Last modified: March 14, 2024

---

# css e js

 *  Resolved [ilgrizly](https://wordpress.org/support/users/ilgrizly/)
 * (@ilgrizly)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/css-e-js/)
 * Hi, I’m using your plugin but I can’t exclude the css and js of a plugin I use,
   why don’t they appear? the plugin is “Events Shortcodes For The Events Calendar”
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcss-e-js%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 12 replies - 1 through 12 (of 12 total)

 *  Plugin Support [Dimo Dimov](https://wordpress.org/support/users/dimodi/)
 * (@dimodi)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/css-e-js/#post-17500980)
 * Hello [@ilgrizly](https://wordpress.org/support/users/ilgrizly/),
 * The drop-down exclude menu only lists scripts added through the default WordPress
   hooks. If a script is missing from the list, you can exclude it manually using
   one of the filters we’ve designed for that purpose. All available filters can
   be found here:
 * [https://www.siteground.com/tutorials/wordpress/speed-optimizer/custom-filters/](https://www.siteground.com/tutorials/wordpress/speed-optimizer/custom-filters/)
 * The following post provides guidance on how you can find the script handle:
 * [https://wordpress.org/support/topic/how-to-use-sg-optimizers-filters-procedure/](https://wordpress.org/support/topic/how-to-use-sg-optimizers-filters-procedure/)
 * Regards,
   Dimo
 *  Thread Starter [ilgrizly](https://wordpress.org/support/users/ilgrizly/)
 * (@ilgrizly)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/css-e-js/#post-17510807)
 * I used all the filters made available but they don’t work, the Events Shortcodes
   For The Events Calendar plugin doesn’t work even though they gave me the complete
   list of all the scripts and css in use
 *  Thread Starter [ilgrizly](https://wordpress.org/support/users/ilgrizly/)
 * (@ilgrizly)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/css-e-js/#post-17510808)
 * template-events-calendar\assets\js\ect-notice.js
   template-events-calendar\assets\
   js\ect-sharebutton.jstemplate-events-calendar\assets\js\ect-sharebutton.min.jstemplate-
   events-calendar\assets\css\ect-admin-notices.csstemplate-events-calendar\assets\
   css\ect-common-styles.csstemplate-events-calendar\assets\css\ect-common-styles.
   min.csstemplate-events-calendar\assets\css\ect-list-view.csstemplate-events-calendar\
   assets\css\ect-list-view.min.csstemplate-events-calendar\assets\css\ect-minimal-
   list-view.csstemplate-events-calendar\assets\css\ect-sharebutton.csstemplate-
   events-calendar\assets\css\ect-sharebutton.min.csstemplate-events-calendar\assets\
   css\ect-timeline.csstemplate-events-calendar\assets\css\ect-timeline.min.csstemplate-
   events-calendar\assets\css\shortcode-generator.css
 *  Thread Starter [ilgrizly](https://wordpress.org/support/users/ilgrizly/)
 * (@ilgrizly)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/css-e-js/#post-17510814)
 *     ```wp-block-code
       add_filter( 'sgo_css_combine_exclude', 'css_combine_exclude' );function css_combine_exclude( $exclude_list ) {// Add the style handle to exclude list.$exclude_list[] = 'template-events-calendar\assets\css\ect-admin-notices.css';$exclude_list[] = 'template-events-calendar\assets\css\ect-common-styles.css';$exclude_list[] = 'template-events-calendar\assets\css\ect-common-styles.min.css';$exclude_list[] = 'template-events-calendar\assets\css\ect-list-view.css';$exclude_list[] = 'template-events-calendar\assets\css\ect-list-view.min.css';$exclude_list[] = 'template-events-calendar\assets\css\ect-minimal-list-view.css';
   
       $exclude_list[] = 'template-events-calendar\assets\css\ect-sharebutton.css';$exclude_list[] = 'template-events-calendar\assets\css\ect-sharebutton.min.css';$exclude_list[] = 'template-events-calendar\assets\css\ect-timeline.css';$exclude_list[] = 'template-events-calendar\assets\css\ect-timeline.min.css';$exclude_list[] = 'template-events-calendar\assets\css\shortcode-generator.css';return $exclude_list;}
   
       add_filter( 'sgo_css_minify_exclude', 'css_minify_exclude' );function css_minify_exclude( $exclude_list ) {// Add the style handle to exclude list.$exclude_list[] = 'template-events-calendar\assets\css\ect-admin-notices.css';$exclude_list[] = 'template-events-calendar\assets\css\ect-common-styles.css';$exclude_list[] = 'template-events-calendar\assets\css\ect-common-styles.min.css';$exclude_list[] = 'template-events-calendar\assets\css\ect-list-view.css';$exclude_list[] = 'template-events-calendar\assets\css\ect-list-view.min.css';$exclude_list[] = 'template-events-calendar\assets\css\ect-minimal-list-view.css';
   
       $exclude_list[] = 'template-events-calendar\assets\css\ect-sharebutton.css';$exclude_list[] = 'template-events-calendar\assets\css\ect-sharebutton.min.css';$exclude_list[] = 'template-events-calendar\assets\css\ect-timeline.css';$exclude_list[] = 'template-events-calendar\assets\css\ect-timeline.min.css';$exclude_list[] = 'template-events-calendar\assets\css\shortcode-generator.css';return $exclude_list;}add_filter( 'sgo_js_minify_exclude', 'js_minify_exclude' );function js_minify_exclude( $exclude_list ) {$exclude_list[] = 'template-events-calendar\assets\js\ect-notice.js';$exclude_list[] = 'template-events-calendar\assets\js\ect-sharebutton.js';$exclude_list[] = 'template-events-calendar\assets\js\ect-sharebutton.min.js';
   
       return $exclude_list;}
   
       add_filter( 'sgo_javascript_combine_exclude', 'js_combine_exclude' );function js_combine_exclude( $exclude_list ) {$exclude_list[] = 'template-events-calendar\assets\js\ect-notice.js';$exclude_list[] = 'template-events-calendar\assets\js\ect-sharebutton.js';$exclude_list[] = 'template-events-calendar\assets\js\ect-sharebutton.min.js';
   
       return $exclude_list;}
   
       add_filter( 'sgo_js_async_exclude', 'js_async_exclude' );function js_async_exclude( $exclude_list ) {$exclude_list[] = 'template-events-calendar\assets\js\ect-notice.js';$exclude_list[] = 'template-events-calendar\assets\js\ect-sharebutton.js';$exclude_list[] = 'template-events-calendar\assets\js\ect-sharebutton.min.js';
   
       return $exclude_list;}
       ```
   
 *  Plugin Support [Gergana Petrova](https://wordpress.org/support/users/gpetrova/)
 * (@gpetrova)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/css-e-js/#post-17511880)
 * Hello [@ilgrizly](https://wordpress.org/support/users/ilgrizly/),
   Based on your
   latest update, the information about the styles and scripts you want to exclude
   is not properly set, which is why the filter is not working as expected. What
   you have added in the exclude list is the full path to the .css/.js in use, however
   what you need to add the .css/.js handle only. You’re welcome to check the topic
   previously provided: [https://wordpress.org/support/topic/how-to-use-sg-optimizers-filters-procedure/](https://wordpress.org/support/topic/how-to-use-sg-optimizers-filters-procedure/)
   on how to identify the handles. Best Regards,Gergana Petrova
 *  Thread Starter [ilgrizly](https://wordpress.org/support/users/ilgrizly/)
 * (@ilgrizly)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/css-e-js/#post-17516231)
 * so I should uninstall the plugin because otherwise it won’t show me the handles,
   then look for all the handles I need for a particular plugin which speed optimizer
   eliminates for me, then reinstall the plugin, unload another snippet plugin and
   then create infinite snipets for and test if it works, in the meantime I’ve had
   two children, a dog, car and house loan, found a lover and a second apartment
   and google has failed in the meantime waiting for covid 2 lol
 *  Plugin Support [Daniela Ivanova](https://wordpress.org/support/users/daniellaivanova/)
 * (@daniellaivanova)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/css-e-js/#post-17516906)
 * Hello [@ilgrizly](https://wordpress.org/support/users/ilgrizly/),
 * What you need to do is make sure you found the proper handle to exclude. For 
   example, if you intend to exclude the template-events-calendar\assets\js\ect-
   sharebutton.min.js handle, what you should add in the filter is the following:
 *     ```wp-block-code
       $exclude_list[] = 'ect-sharebutton';
       ```
   
 * Once you have excluded the handle, the issue should be resolved.
 * Best regards,
   Daniela Ivanova
 *  Thread Starter [ilgrizly](https://wordpress.org/support/users/ilgrizly/)
 * (@ilgrizly)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/css-e-js/#post-17517683)
 * add_filter( ‘sgo_js_minify_exclude’, ‘js_minify_exclude’ );
   function js_minify_exclude(
   $exclude_list ) {$exclude_list[] = ‘ect-hide-notice-js’;$exclude_list[] = ‘ect-
   sharebutton’;$exclude_list[] = ‘ect-feedback-notice-styles’;$exclude_list[] =‘
   ect-common-styles’;$exclude_list[] = ‘ect-list-styles’;$exclude_list[] = ‘ect-
   minimal-list-styles’;$exclude_list[] = ‘ect-sharebutton-css’;$exclude_list[] 
   = ‘ect-timeline-styles’;$exclude_list[] = ‘sg-btn-css’;return $exclude_list;}
 * obviously <?php at the beginning of the string automatically puts it in the Snippet
   plugin
 *  got all the handers from whoever built the plugin, I inserted them into the 
   plugin snippet, I activated it but nothing, and then why is it that if I log 
   in I see everything working and when I log out nothing works anymore? and it 
   seems that the problem is only on desktop computers while on smartphones it changes
   but no script effect is seen
 *  Plugin Support [Daniela Ivanova](https://wordpress.org/support/users/daniellaivanova/)
 * (@daniellaivanova)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/css-e-js/#post-17517785)
 * Hello,
 * Everything is working as expected when you are logged in to the backend of the
   website because the caching is disabled for logged-in users.
 * Please, make sure that the excluded handles are properly added to the website’s
   current theme’s functions.php file. If this does not resolve the issue, most 
   likely something else installed on your website is interfering with the proper
   caching of your site. In this case, I would recommend you to disable other plugins
   or change the theme to find out exactly what is causing the issue.
 * Best Regards,
   Daniela Ivanova
 *  Thread Starter [ilgrizly](https://wordpress.org/support/users/ilgrizly/)
 * (@ilgrizly)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/css-e-js/#post-17522602)
 * add_filter( ‘sgo_js_minify_exclude’, ‘js_minify_exclude’ );
   function js_minify_exclude(
   $exclude_list ) {$exclude_list[] = ‘ect-hide-notice-js’;$exclude_list[] = ‘ect-
   sharebutton’;$exclude_list[] = ‘ect-feedback-notice-styles’;$exclude_list[] =‘
   ect-common-styles’;$exclude_list[] = ‘ect-list-styles’;$exclude_list[] = ‘ect-
   minimal-list-styles’;$exclude_list[] = ‘ect-sharebutton-css’;$exclude_list[] 
   = ‘ect-timeline-styles’;$exclude_list[] = ‘sg-btn-css’;return $exclude_list;}
 *  Thread Starter [ilgrizly](https://wordpress.org/support/users/ilgrizly/)
 * (@ilgrizly)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/css-e-js/#post-17522610)
 * I tried both inserting it into the functions.php file and as a php string activated
   by snippet but nothing changes
 *  Plugin Support [Georgi Ganchev](https://wordpress.org/support/users/georgiganchev/)
 * (@georgiganchev)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/css-e-js/#post-17522725)
 * Hello [@ilgrizly](https://wordpress.org/support/users/ilgrizly/),
 * If setting up the proper handles is not working then different handles should
   be excluded and interact with the files of the Events Shortcodes For The Events
   Calendar or something else is interfering.
 * I would suggest that you disable the combination and use the Code Snippets plugin
   to extract all handles of the scripts loaded on the page and put them under the
   filter in functions.php of your theme. You can enable the option from the plugin
   at that point and start commenting out each handle one by one to see when the
   combination won’t affect the desired script.
 * Please be advised that in the example you provided you have excluded the handles
   from getting minified. If you want to exclude them from getting combined you 
   should use:
 * `add_filter( 'sgo_css_combine_exclude', 'css_combine_exclude' ); **function****
   css_combine_exclude**( $exclude_list ) { // Add the style handle to exclude list.`
 * `$exclude_list[] = 'style-handle'; `
 * `$exclude_list[] = 'style-handle-2'; `
 * `**return** $exclude_list; }`
 * And for JS files:
 * `add_filter( 'sgo_javascript_combine_exclude', 'js_combine_exclude' ); **function****
   js_combine_exclude**( $exclude_list ) { `
 * `$exclude_list[] = 'script-handle'; `
 * `$exclude_list[] = 'script-handle-2'; `
 * `**return** $exclude_list; }`
 * All filters can be found on this link:
 * [https://www.siteground.com/tutorials/wordpress/speed-optimizer/custom-filters/](https://www.siteground.com/tutorials/wordpress/speed-optimizer/custom-filters/)
 * Then you will know the correct handles that should be excluded for the proper
   work of the plugin.
 * Best regards,
   Georgi GanchevSiteGround.com

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘css e js’ is closed to new replies.

 * ![](https://ps.w.org/sg-cachepress/assets/icon-256x256.gif?rev=2971889)
 * [Speed Optimizer - The All-In-One Performance-Boosting Plugin](https://wordpress.org/plugins/sg-cachepress/)
 * [Support Threads](https://wordpress.org/support/plugin/sg-cachepress/)
 * [Active Topics](https://wordpress.org/support/plugin/sg-cachepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sg-cachepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sg-cachepress/reviews/)

 * 12 replies
 * 5 participants
 * Last reply from: [Georgi Ganchev](https://wordpress.org/support/users/georgiganchev/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/css-e-js/#post-17522725)
 * Status: resolved