Quantcast
Channel: WordPress.org Forums » [Autoptimize] Support
Viewing all articles
Browse latest Browse all 14096

Frank Goossens on "[Plugin: Autoptimize] 500 error in WooCommerce Pages, when crawled by GoogleBot"

$
0
0

OK, a radically different approach, using the API;

add_filter('autoptimize_js_do_minify','survivehive_ao_js_minify',10,1);
function survivehive_ao_js_minify() {
	if (strpos($_SERVER['HTTP_USER_AGENT'],"Googlebot")!==false)
		return false;
	} else {
		return true;
	}

add this to your theme's functions.php (or better still; in a seperate plugin) and see if that works. it should not cause AO not to minify if the useragent is a googlebot one.

(i have not tested this myself yet)


Viewing all articles
Browse latest Browse all 14096

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>