How to exclude hotspot file from optimzation
-
Can you please tell me How to exclude hotspot file from optimzation by hook, I am using sg optimizer plugin (https://wordpress.org/plugins/sg-cachepress/) please read this page carefully it will help you to get hook to exclude hotspot file.
i was adding this code but it looks like not working
// Exclude Hotspot Css File From Concatination and Minifications
function css_combine_exclude( $exclude_list ) {
// Add the style handle to exclude list.
$exclude_list[] = ‘el-hotspot’;
return $exclude_list;
}
add_filter( ‘sgo_css_combine_exclude’, ‘css_combine_exclude’ );
function css_minify_exclude( $exclude_list ) {
// Add the style handle to exclude list.
$exclude_list[] = ‘el-hotspot’;
return $exclude_list;
}
add_filter( ‘sgo_css_minify_exclude’, ‘css_minify_exclude’ );
Hello,
Usually, we recommend using WP Rocket and it does not require editing any code.
When you enable the optimization plugin does it influence the hotspot element?
Best Regards
i do not want paid plugin, sg optimizer is free plugin by hosting. yup it disturbing hotspot element when enable. please help
Hello,
We don’t know how this plugin works and how to exclude files there. You need to refer to the plugin’s documentation or contact its support for help. The JS file required for the hotspot element is located in woodmart/js/scripts/elements/hotSpot.js
.
Let me know if there are any questions that I can help you with.
Kind Regards