Hi David,
Props on the new distribution,
I already know how to add meta tags to the index, but for seo purposes, I need to add these for /brand/, /category/, /merchant/, ie: brand/7forallmankind shows the actual brand name in my meta tags. The same for category and merchant. This is possible correct?
Thanks in adavace,
Ray
Hi Ray,
Sure - Those pages are actually all generated by search.php, and in that file you will find the following code around line 260:
$header["title"] = htmlentities($q,ENT_QUOTES,$config_charset);
At this point, you can additionally set the meta keyword and description tags as follows (the merchant, category or brand name is in the $parts[1] variable)
if($parts[1])
{
$header["meta"]["keywords"] = $parts[1];
$header["meta"]["description"] = $parts[1]." product index";
if ($page > 1) $header["meta"]["description"] .= " page ".$page;
}
I've added in the page number if greater than page one in the above code to avoid duplicate descriptions. The keywords / description can be further embelished if you wish by combining $parts[0] which will contain "merchant", "category" or "brand" at this point.
Hope this helps!
Cheers,
David.
--
PriceTapestry.com