Answer the question
In order to leave comments, you need to log in
Wordpress Autoptimize, why can't I turn it off?
The site has the well-known Autoptimize plugin installed. On some pages it is necessary that it does not work, i.e. when opened, it did not optimize them. Please tell me if there is a way to turn it off.
Let's say I disable other plugins in function.php like this
function remove_plugin_wpportfolio() {
remove_action('wp_head', 'WPPortfolio_styles_frontend_renderCSS');
wp_deregister_script('stw-pagepix');
}
function remove_plugin_filegallery() {
wp_dequeue_style('file_gallery_nikitak');
wp_dequeue_style('file_gallery_default');
wp_dequeue_style('file_gallery_columns');
}
remove_action('after_setup_theme','autoptimize_do_cachepurged_action');
Answer the question
In order to leave comments, you need to log in
add_filter('autoptimize_filter_noptimize','my_ao_noptimize',10,0);
function my_ao_noptimize() {
if (strpos($_SERVER['REQUEST_URI'],'слаг-страницы')!==false) {
return true;
} else {
return false;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question