You are here:  » Meta Keywords


Meta Keywords

Submitted by Antony on Thu, 2020-06-18 08:13 in

Hi David,

Hope you well, not related to PT really but I thourght I'd ask. Would you personally bother with Meta Keywords or do you think implementing targeted keywords within descriptions is just as good?

Best,

Ant

Submitted by support on Thu, 2020-06-18 08:42

Hi Ant,

I've always kept any SEO aspects of the script to the very basics, clean URLs, clear titles etc, basic meta keywords / description allowing users flexibility to implement their own strategies so I wouldn't want to suggest one way or the other, but if you're ever not sure how to implement something of course just let me know and I'll try and point you in the right direction...

Cheers,
David.
--
PriceTapestry.com

Submitted by Antony on Thu, 2020-06-18 09:05

I understand, fair point!

Thanks!

Submitted by Antony on Thu, 2020-06-18 10:19

Hi again David, sorry to bother but following your recent replies im now trying to insert Date and ISO codes within meta descriptions. Obviously the bellow is not correct so just to illustrate what I need. Ive tried various combinaisions but so far no positive results.

I would like the date first, followed by the ISO codes but separated by a Dash; and then have space to manually input my description; something like this I suppose:

$header["description"] = <?php echo date("M-Y");?> - $_SERVER["REQUEST_URI"])." ".translate("...");

Thanks in advance!

Ant

Submitted by support on Thu, 2020-06-18 11:36

Hi Ant,

meta/description can be set by the scripts that include html/header.php by setting $header["meta"]["description"] for example product pages set this at line 70 of products.php:

  $header["meta"]["description"] = translate("Price search results for")." ".$product["products"][0]["name"];

So if you wanted to prefix that with date("M-Y") you could REPLACE with:

  $header["meta"]["description"] = date("M-Y")." - ".translate("Price search results for")." ".$product["products"][0]["name"];

I wasn't quite sure what you meant by ISO code in this context; if you're still not sure from the example above if you could give an actual output example of the meta description content you're aiming for (and on which page) I'll check it out further with you...

Cheers,
David.
--
PriceTapestry.com

Submitted by Antony on Thu, 2020-06-18 12:11

Thanks for your reply David,

The above works great! By ISO code I meant to refer to each of my installations (uk, fr, us,.. ) which is country relevant.

As an example the end result needed would include the ISO code (ie. UK) within the description between the date and Remaining Text such as:

Jun-2020 - UK Price search results for ...

Looking at yesterdays response on canonicals (bellow) I think this should possible and straight forward but I can't work it out.

<?php
  
if ($config_baseHREF != "/uk/")
  {
    print 
"<link rel='canonical' href='".str_replace($config_baseHREF,"/uk/",$_SERVER["REQUEST_URI"])."' />";
  }
?>

Thanks,

Ant

Submitted by support on Thu, 2020-06-18 12:17

Hi Ant,

Sure - you could use $config_baseHREF trim()'ed to remove the "/" and made upper case, for example:

  $header["meta"]["description"] = date("M-Y")." - ".strtoupper(trim($config_baseHREF,"/"))." ".translate("Price search results for")." ".$product["products"][0]["name"];

Cheers,
David.
--
PriceTapestry.com

Submitted by Antony on Thu, 2020-06-18 12:24

Perfect! Many thanks and have a great day!

Ant