Jump to content

[SOLVED] How remove Shop Name from home page (index.php)?


Recommended Posts

Hello all. I want to remove my shop name from the begining of my Meta Title on the home page (index.php). For example, in my shop it displays: "Shop Title - description" as written in the CMS. I just want it to be instead: "descripton" and i can name add the shop title if need be. Thank you.

  • Like 2
Link to comment
Share on other sites

Yes, I know you can edit the meta tags in the places you mentioned. However, the shop name is put in front of all of these Title tags. I'm trying to figure out how to remove the shop title name from appearing at the beginning of the title tag, even when it is not included in admin>preferences>meta tags>index.php. Anybody? Oh, and thanks for responding to my question. :)

Depends on which version of Prestashop you are using.

v1 meta tags for the homepage are controlled from admin>preferences>appearance.

v1.1 Meta tags for the homepage are controled from admin>preferences>meta tags>index.php
Link to comment
Share on other sites

I just realized this is for the CMS pages, but this does not work for for pages linke index.php, contat-form.php where their meta tag information is editied in: Back Office -> Preferences -> Meta Tags. Any idea on how to edit the code so the shop name isn't put in fron for these title tags? Thanks, I think it is also edited in classes/tools.php, but I'm not sure how to change the code. Thank you.


Thanks alot Rocky! :)

Oops, just realised that the new code is redundant. You can just delete the old line instead of changing it.
Link to comment
Share on other sites

  • 2 weeks later...

Hi as rocky stated In classes/Tools.php on line 477, change:

$ret['meta_title'] = (isset($metas['title']) AND $metas['title']) ? Configuration::get('PS_SHOP_NAME').' - '.$metas['title'] : Configuration::get('PS_SHOP_NAME');

change to:

$ret['meta_title'] = (isset($metas['title']) AND $metas['title']) ? $metas['title'] : Configuration::get('PS_SHOP_NAME');

This is basically removing the code:

Configuration::get('PS_SHOP_NAME').' - '.

Cheers rocky spent ages trying to find it.

Link to comment
Share on other sites

  • 3 months later...

Hi,

I have tried the suggestions you presented but everytime I change something in tools.php I get one of this 3 results:

a) Hack Attempt
B) Error on Tools.php
c) Everything looks great but log in into backoffice the system gives an error because of header problems.

How to go around this situations?

Link to comment
Share on other sites

  • 8 months later...

classes/tools.php

$ret['meta_title'] = (isset($metas['title']) AND $metas['title']) ? Configuration::get('PS_SHOP_NAME').'-'.$metas['title'] : Configuration::get('PS_SHOP_NAME');



to:

$ret['meta_title'] = (isset($metas['title']) AND $metas['title']) ? $metas['title'] : '';

Link to comment
Share on other sites

classes/tools.php
$ret['meta_title'] = (isset($metas['title']) AND $metas['title']) ? Configuration::get('PS_SHOP_NAME').'-'.$metas['title'] : Configuration::get('PS_SHOP_NAME');



to:

$ret['meta_title'] = (isset($metas['title']) AND $metas['title']) ? $metas['title'] : '';



Thanks! worked for me
Link to comment
Share on other sites

×
×
  • Create New...