You are here:  » Mata description and keywords on category page


Mata description and keywords on category page

Submitted by wesse249 on Sat, 2015-03-14 21:20 in

Hello,

How can i place Meta description and keywords on the category page?

Greetings JR

Submitted by support on Sun, 2015-03-15 10:34

Hello JR,

The Category A-Z page is generated by categories.php. To add a meta title / description to this page, look for the following code at line 32:

  $header["title"] = translate("Category")." A-Z";

...and REPLACE with:

  $header["title"] = translate("Category")." A-Z";
  $header["meta"]["description"] = "Your meta description here";
  $header["meta"]["keywords"] = "your,meta,keywords,here";

The actual search results pages after selecting a category are generated by search.php, so to add a description and keywords including the category name (which can be accessed through the $parts[1] variable) look for the following code at line 399:

  $header["title"] = $q;

...and REPLACE with:

  $header["title"] = $q;
  $header["meta"]["description"] = $parts[1]." meta description here";
  $header["meta"]["keywords"] = $parts[1].",meta,keywords,here";

Hope this helps!

Cheers,
David.
--
PriceTapestry.com