Hi, I want to stop loading your script on the homepage. I tried this code on functions.php:
// Disables AddToAny's core script on home page
function addtoany_disable_script($script_disabled) {
if ( is_front_page() ) {
return true;
} else {
return $script_disabled;
}
}
add_filter( 'addtoany_script_disabled', 'addtoany_disable_script' );
but nothing happens. I cleared the cache but the script still loads…
<link rel='stylesheet' id='addtoany-css' href='*******/wp-content/plugins/add-to-any/addtoany.min.css?ver=1.15' type='text/css' media='all' />
<style id='addtoany-inline-css' type='text/css'>
<script type='text/javascript' src='*******/wp-content/plugins/add-to-any/addtoany.min.js?ver=1.1'></script>
I don’t want the script bit neither the styles to appear on the homepage. Is this possible? Thanks!