You are here:  » Meta Tag Tweak


Meta Tag Tweak

Submitted by crounauer on Mon, 2006-04-10 14:54 in

Hi,

In the new distribution, the "keywords" tag is currently the title of the product with no commas seperating the keywords.

In order to insert commas add this code into header.php

<?php
 
if (($name) == "keywords") {$content str_replace(" ",", ",$content);} 
?>

below this line...

<?php
 
if (isset($header["meta"])): foreach($header["meta"] as $name => $content): 
?>

I think I have done the coding correctly, perhaps you could double check this for me please David?

Submitted by support on Mon, 2006-04-10 15:10

Looks OK at first glance; but I would confirm it with a view -> source on the HTML to check that it does as expected...

Submitted by crounauer on Mon, 2006-04-10 15:13

Have checked it on => View Source and everything looks OK!

Computer Hardware

Submitted by Simon on Tue, 2006-08-22 21:46

Does anyone know how to change the bit where its says price search result in the meta description - i'd like to be able to change this

Thanks

Simon

PriceWatchUK.com

Submitted by support on Tue, 2006-08-22 22:36

Hi Simon,

The meta description tag on the product page is set on line 43 of products.php. From the distribution:

$header["meta"]["description"] = translate("Price search results for")." ".htmlentities($q,ENT_QUOTES,$config_charset);

You can simply edit the text within the translate() call, or simply remove the call to translate() and just add your own text. The code within the call to htmlentities() gives the current query, which is the product being displayed. For example:

$header["meta"]["description"] = "Some Text".htmlentities($q,ENT_QUOTES,$config_charset);

Hope this helps,
Cheers,
David.