Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Frank Goossens

    (@futtta)

    Seems somewhat similar to what was reported here.

    In the end we added something similar to this piece of code in a seperate helper-plugin (but can also be in your theme’s functions.php or in a child theme’s functions.php) to make sure google got no error;

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

    This could be a solution for you as well.

    Hope this helps,
    frank

    Thread Starter DrNeptune

    (@drneptune)

    Thanks for the reply, So i just add this to the end of my functions.php file?

    Plugin Author Frank Goossens

    (@futtta)

    you can, but in that case you could loose the changes if the theme would get updated. so except if you’re sure the theme won’t get updated, you should rather either create a child theme with it’s own functions.php or create a simple plugin with that code.

    frank

    Thread Starter DrNeptune

    (@drneptune)

    ya I tried to make a child theme but it kept not grabbing the old themese info. But Wouldnt it be the same if I were to just download the functions.php file and just replace it with the new one if i do update the theme?

    Plugin Author Frank Goossens

    (@futtta)

    yeah, that would work ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘404 errors with googlebot’ is closed to new replies.