Jump to content

Remove shop title from category and product?


Rapik

Recommended Posts

Hi,

How Can I remove shop title from categories and products sites ?
For ex. Meta title for product looks like - product meta title - website meta title .

I want to display only product meta title without website meta title .

 

Can anyone help me with this ?

Regards

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

You can modify the file:

/classes/Meta.php

 

At line 226 you find:

 

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

change this to:

 

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

then look for the category pages

at line 287 you find:

 

                // Paginate title
                if (!empty($row['meta_title']))
                    $row['meta_title'] = $title.$row['meta_title'].(!empty($page_number) ? ' ('.$page_number.')' : '').' - '.Configuration::get('PS_SHOP_NAME');
                else
                    $row['meta_title'] = $row['name'].(!empty($page_number) ? ' ('.$page_number.')' : '').' - '.Configuration::get('PS_SHOP_NAME');
    
                if (!empty($title))
                    $row['meta_title'] = $title.(!empty($page_number) ? ' ('.$page_number.')' : '').' - '.Configuration::get('PS_SHOP_NAME');
    
                $result = Meta::completeMetaTags($row, $row['name']);

change this to:

 

// Paginate title
                if (!empty($row['meta_title']))
                    $row['meta_title'] = $title.$row['meta_title'].(!empty($page_number) ? ' ('.$page_number.')' : '');
                else
                    $row['meta_title'] = $row['name'].(!empty($page_number) ? ' ('.$page_number.')' : '');
    
                if (!empty($title))
                    $row['meta_title'] = $title.(!empty($page_number) ? ' ('.$page_number.')' : '');
    
                $result = Meta::completeMetaTags($row, $row['name']);

Repeat this for the other page-types

 

regards

Whiley

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...