I needed the following code to hide the product’s price from search engines:
1 2 3 |
if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/bot|crawl|slurp|spider/i', $_SERVER['HTTP_USER_AGENT'])) { return false; } |
I needed the following code to hide the product’s price from search engines:
1 2 3 |
if (isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/bot|crawl|slurp|spider/i', $_SERVER['HTTP_USER_AGENT'])) { return false; } |