sorinmarius Posted April 3, 2012 Share Posted April 3, 2012 Hi, I have a big question that has been on my mind since forever. I gave tags to every product in my store. When I click on the tag from my tag module in the sidebar, every tag page has the same "title tag". How can I change the title on the Tag Page from "Search" to the tags name? Please Help! Thanks. Link to comment Share on other sites More sharing options...
Skydone Posted December 9, 2012 Share Posted December 9, 2012 I am also looking for a solution for this, I use the tags for organice my products. It will be great if just can print the query text in the title tag of a search results page, but in SEO configuration I can't write parameters or variables. I'm using PS 1.5.0.17. Link to comment Share on other sites More sharing options...
Skydone Posted December 9, 2012 Share Posted December 9, 2012 I only have found this code related, but not tested yet: http://forge.prestashop.com/browse/PSCFI-6432 1 Link to comment Share on other sites More sharing options...
lildaan Posted April 24, 2013 Share Posted April 24, 2013 Works really great! Now I only have to change the h1-tag on the page ass well.... Link to comment Share on other sites More sharing options...
ropencho Posted September 11, 2013 Share Posted September 11, 2013 Hi!!! In wich file i must insert this code? Link to comment Share on other sites More sharing options...
qiqiy_888 Posted March 8, 2016 Share Posted March 8, 2016 Works really great! Now I only have to change the h1-tag on the page ass well.... Hi, can you please tell us where to insert to this code ? does it works well on 1.6 ? thank you Link to comment Share on other sites More sharing options...
qiqiy_888 Posted March 8, 2016 Share Posted March 8, 2016 in pre v1.6, i added this code, it works well: classes/Meta.php Find the getMetaTags function add the code between "add by ruby" -------------------------------------------- public static function getMetaTags($id_lang, $page_name, $title = '') { if (!(!Configuration::get('PS_SHOP_ENABLE') && !in_array(Tools::getRemoteAddr(), explode(',', Configuration::get('PS_MAINTENANCE_IP'))))) { if ($page_name == 'product' && ($id_product = Tools::getValue('id_product'))) { return Meta::getProductMetas($id_product, $id_lang, $page_name); } elseif ($page_name == 'category' && ($id_category = Tools::getValue('id_category'))) { return Meta::getCategoryMetas($id_category, $id_lang, $page_name, $title); } elseif ($page_name == 'manufacturer' && ($id_manufacturer = Tools::getValue('id_manufacturer'))) { return Meta::getManufacturerMetas($id_manufacturer, $id_lang, $page_name); } elseif ($page_name == 'supplier' && ($id_supplier = Tools::getValue('id_supplier'))) { return Meta::getSupplierMetas($id_supplier, $id_lang, $page_name); } elseif ($page_name == 'cms' && ($id_cms = Tools::getValue('id_cms'))) { return Meta::getCmsMetas($id_cms, $id_lang, $page_name); } elseif ($page_name == 'cms' && ($id_cms_category = Tools::getValue('id_cms_category'))) { return Meta::getCmsCategoryMetas($id_cms_category, $id_lang, $page_name); } //add by ruby elseif ($page_name == 'search') { if ($placeholder = Tools::getValue('search_query')) { $the_title = 'Results for matching "'.$placeholder.'" ~~ '.Configuration::get('PS_SHOP_NAME'); $srt['meta_description'] = 'The result is '.$placeholder." from ".Configuration::get('PS_SHOP_NAME'); } else if ($placeholder = Tools::getValue('tag')) { $the_title = 'Tagged with "'.$placeholder.'" ~~ '.Configuration::get('PS_SHOP_NAME'); $srt['meta_description'] = 'The result is '.$placeholder." from ".Configuration::get('PS_SHOP_NAME'); } else { $the_title = 'Product Search ~~ '.Configuration::get('PS_SHOP_NAME'); $srt['meta_description'] = 'The result is '.$placeholder." from ".Configuration::get('PS_SHOP_NAME'); } $srt['meta_title'] = $the_title; return $srt; } // end add by ruby } return Meta::getHomeMetas($id_lang, $page_name); } Link to comment Share on other sites More sharing options...
Daresh Posted March 8, 2016 Share Posted March 8, 2016 Hi, check out this module: https://www.prestashop.com/forums/topic/499087-free-module-seo-friendly-titles-for-tags/ Link to comment Share on other sites More sharing options...
Manoj Agarwal Posted June 10, 2019 Share Posted June 10, 2019 how to use this i had installed the module, now what i need to do? Link to comment Share on other sites More sharing options...
Daresh Posted June 10, 2019 Share Posted June 10, 2019 Nothing, it just changes the title Link to comment Share on other sites More sharing options...
Tony153 Posted June 20, 2019 Share Posted June 20, 2019 (edited) How this code works? any one please help me to understand this code. www.tellthebell.com Edited June 21, 2019 by Tony153 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now