You are here:  » Add noindex to the header


Add noindex to the header

Submitted by Vifil on Wed, 2019-01-23 09:43 in

Hi
I plan to use the script to insert products into content rich articles.

I will add all relevant paths in the robots.txt, and I'll configure the displays to link directly to the merchant, so hopefully no PriceTapestry-generated URL's will ever be visited.

Still, just in case, I would like to add noindex,follow to ALL Price Tapestry generated pages.

How would this be possible?

Thank you very much in advance

Submitted by support on Wed, 2019-01-23 10:43

Hi,

Sure - if you edit pto.php and look for the following code at line 755:

  $pto_headDone = TRUE;

...and REPLACE with:

  global $pto_q;
  if ($pto_module || $pto_q)
  {
    print "<meta name='robots' content='noindex,follow'>";
  }
  $pto_headDone = TRUE;

Cheers,
David.
--
PriceTapestry.com

Submitted by Vifil on Thu, 2019-01-24 08:42

Works like a charm, thank you :-)

Submitted by Vifil on Tue, 2020-03-10 08:01

Just an update if anyone else is reading this, for some reason with the latest wordpress update the code now also noindexes all articles where products are inserted with shortcode - not so good :-D

@David you don't need to do any editing, I've just removed the code and I don't need it anymore, just wanted to give a heads-up :-)