You are here:  » Adding meta noindex to product pages

Active Forum Topics


Adding meta noindex to product pages

Submitted by ccgale on Tue, 2013-08-20 18:05 in

Hi

Is there an easy way to add a meta no follow tag to the products page on a PT store running through wordpress? I want the bots to index the category and search pages but not the product pages, for duplicate content reasons.

In the WP settings I see meta keyword and description boxes but nowhere to put the bit.

Thanks
Carl

Submitted by support on Wed, 2013-08-21 07:58

Hi Carl,

Did you mean a "noindex" robots meta tag? Sure - in the plugin file pto.php look for where the meta description tag is output (this only occurs on product and review pages) by the following code at line 366:

  print "<meta name='description' content='".htmlentities($description,ENT_QUOTES,get_settings("blog_charset"))."' />\n";

...and REPLACE with:

  print "<meta name='description' content='".htmlentities($description,ENT_QUOTES,get_settings("blog_charset"))."' />\n";
  print "<meta name='robots' content='noindex' />";

Cheers,
David.
--
PriceTapestry.com