Jump to content

Homepage Meta Data


 Share

Recommended Posts

Apologies, I've had a search but can't find the answer.

 

My homepage meta at the moment is:

 

<title>Sitename - Sitename</title>

<meta name="description" content="Shop powered by PrestaShop" />

 

I know the second Sitename in the title comes from contacts, but where is the first set for the homepage? Also, how can I change the meta description on the homepage?

 

Thanks

Share this post


Link to post
Share on other sites

go to prefereces > seo & urls

you will see there list of all prestashop pages

click on edit button near "index" (index = homepage)

you will see there fields to modify title and other meta tags

  • Like 1

Share this post


Link to post
Share on other sites

  • 1 month later...

Hello, 

 

using 1.6.x

 

I changed homepage meta title but see that it adds the shop name my edited title

 

How can I disable it. I also dont know why it puts shop name at the end if it lets to edit meta title by me.

 

I set the title like this(also i want the title like this):  "Sonkaya Makina | Ambalaj ve Paketleme Makinaları"

 

my shop name is "Sonkaya Makina ve Otomasyon Teknolojileri"

 

presta makes(combines) the title :  "Sonkaya Makina | Ambalaj ve Paketleme Makinaları - Sonkaya Makina ve Otomasyon Teknolojileri"

 

and you can check the title from the link also http://www.sonkaya.com.tr

 

Thanks.

Edited by sonkaya (see edit history)

Share this post


Link to post
Share on other sites

Hey,

you're gonna need to override the Meta.php Class to get rid of Prestashop adding your site name at the end of the one you type in.

 

The following works for me:

<?php
/*
*
*
* remove shop name from meta title
*
*  @author ***

*/

class Meta extends MetaCore
{
	/**
	 * Get meta tags for a given page
	 *
	 * @since 1.5.0
	 * @param int $id_lang
	 * @param string $page_name
	 * @return array Meta tags
	 */
	public static function getHomeMetas($id_lang, $page_name)
	{
		$metas = Meta::getMetaByPage($page_name, $id_lang);
		$ret['meta_title'] = (isset($metas['title']) && $metas['title']) ? $metas['title'] : '';
		$ret['meta_description'] = (isset($metas['description']) && $metas['description']) ? $metas['description'] : '';
		$ret['meta_keywords'] = (isset($metas['keywords']) && $metas['keywords']) ? $metas['keywords'] :  '';
		return $ret;
	}
}

saves this as Meta.php in /override/classes .

 

Note that this is only for homepage, you would need to do something similar for the other pages. So edit getCategoryMetas() function etc. as well if oyu want it for the other meta tags too

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for help Defuzed,

 

But there must be an option box for users like me who dont want store names at the end of the titles for home and category pages.

 

How can I ask the developers for my update request.

 

Many thanks.

Share this post


Link to post
Share on other sites

You can submit a feature request via the "vote to improve prestashop" button you will find at the bottom right of the forums but this will at best take quite some time... I really suggest you use the Meta CLass override until such a feature gets implemented.

Share this post


Link to post
Share on other sites

 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More