Whispar1 Posted May 9, 2014 Share Posted May 9, 2014 Can someone please provide the proper syntax for replacing PS_SHOP_NAME with the current category name? $meta_tags['meta_title'] = $default_value.' - '.Configuration::get('PS_SHOP_NAME'); Thank You for any replies Link to comment Share on other sites More sharing options...
vekia Posted May 9, 2014 Share Posted May 9, 2014 and what if someone will not browse category page, but other part of shop? i've got idea in my head with changes in tpl file only 1 Link to comment Share on other sites More sharing options...
Whispar1 Posted May 9, 2014 Author Share Posted May 9, 2014 The whole idea behind this started with removing the PS_SHOP_NAME that Prestashop adds to the end of all <title> meta tags. It is not necessary and takes away from SEO keywords. DH42 had a good tutorial on how to remove this but what I wanted to do was take it a step further and add the category name instead for certain pages (i.e. product, category, etc) I "THINK" can control where this happens by only changing this for the section I wish to change in meta.php For instance, if I add the category name to the product pages, it will add a relevant keyword to the title tag. I always leave the title blank in the BO so that it pulls the name of the product. What are your thoughts Vekia? Link to comment Share on other sites More sharing options...
vekia Posted May 9, 2014 Share Posted May 9, 2014 take a look, i changed header.tpl file located in theme directory <title> {if $category} {$meta_title|escape:'html':'UTF-8'|replace:Configuration::get('PS_SHOP_NAME'):$category->name} {else} {$meta_title|escape:'html':'UTF-8'|replace:Configuration::get('PS_SHOP_NAME'):''} {/if} </title> code above will remove shop name from <meta> title from each page in your store. and if you will browse categories - it will add category name instead no core modifications based on my guide available here: remove shop name from meta title 1 Link to comment Share on other sites More sharing options...
Whispar1 Posted May 9, 2014 Author Share Posted May 9, 2014 (edited) Perfect! Thank you Vekia - always so helpful! Now if I can just get Prestashop to show product availability date on the product page (which currently it does not) - the product pages should be very user friendly. Thank you kindly! Edited May 9, 2014 by Whispar1 (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted May 9, 2014 Share Posted May 9, 2014 you're welcome topic marked as solved Link to comment Share on other sites More sharing options...
dvir Posted December 9, 2014 Share Posted December 9, 2014 hi vekia thank you for all your topics - it been very helpful i have a problem : i want , that if the META TITLE is not null - the theme will take only the meta title but if the meta title is null - then it work like you postd. how can i do it ? Link to comment Share on other sites More sharing options...
dvir Posted December 9, 2014 Share Posted December 9, 2014 hi vekia thank you for all your topics - it been very helpful i have a problem : i want , that if the META TITLE is not null - the theme will take only the meta title but if the meta title is null - then it work like you postd. how can i do it ? 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