You are here:  » Using CSV file to create custom meta info


Using CSV file to create custom meta info

Submitted by shaunmac on Sat, 2016-02-27 03:24 in

Hello David I have a question about meta info. I have a 3 custom fields I have registered in my data base (keywords, meta_details, meta_title) how would i get then to display as my meta info for each product page so search engines can see them?
Thanks
Shaun

Submitted by support on Sat, 2016-02-27 07:34

Hello Shaun,

To use your custom title field, edit products.php and look for the following code at line 64:

      $header["title"] = $product["products"][0]["name"];

...and REPLACE with:

      $header["title"] = $product["products"][0]["meta_title"];

And for meta description / keywords, look for the following code beginning at line 70:

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

...and REPLACE with:

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

Cheers,
David.
--
PriceTapestry.com

Submitted by shaunmac on Sat, 2016-02-27 21:45

Thanks David it worked great
Shaun