duplicate meta descriptions on xmap generated sitemap

Discuss Search Engine Optimization in relation to Joomla!. This forum will also have discussions on SEF/SEO Joomla! extensions.

Moderator: General Support Moderators

Locked
snrossi
Joomla! Apprentice
Joomla! Apprentice
Posts: 33
Joined: Wed May 11, 2011 12:30 pm

duplicate meta descriptions on xmap generated sitemap

Post by snrossi » Sat Jul 14, 2012 10:03 am

Hi I am using XMAP to create my site map but it has the same Meta descriptions as the home page . Is there a way to fix this??? i have tried shf404 but it created so many duplicate pages its taken two months to sort it out. I have removed shf404 and only use the original sef plugin in joomla 1.5.26. Please help
Website is www.statewidecarpetcleaners.com.au

User avatar
Harvey51
Joomla! Explorer
Joomla! Explorer
Posts: 300
Joined: Tue Feb 23, 2010 8:16 pm
Location: Morecambe UK
Contact:

Re: duplicate meta descriptions on xmap generated sitemap

Post by Harvey51 » Tue Jul 24, 2012 2:11 pm

Because of self promotion I cannot put a link to my own site.

If you follow my signature and hover over the 'Joomla Support' menu item you will see a menu link 'Override Global Meta Description'.

This is an article about adding a snippet of code to your template's index.php file and setting a meta description based on a menu items id.

This will solve your issue.
Joomla Expert http://http://urlofseo.com/joomla-support-service Expert Joomla Development and Support
Joomla SEO http://urlofseo.com small and medium sized enterprises.

joomilove
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Jun 19, 2013 4:52 pm

Re: duplicate meta descriptions on xmap generated sitemap

Post by joomilove » Wed Jun 19, 2013 6:10 pm

Hi!
I have the same problem please help me to resolve the issue
Thanks
Joomla! is a extremely customizable

User avatar
Harvey51
Joomla! Explorer
Joomla! Explorer
Posts: 300
Joined: Tue Feb 23, 2010 8:16 pm
Location: Morecambe UK
Contact:

Re: duplicate meta descriptions on xmap generated sitemap

Post by Harvey51 » Fri Jun 21, 2013 10:44 am

You need to edit your templates index.php file, or similar in framework templates.

Make sure this code goes in the area between:

Code: Select all

<head>

</head>
Also make sure it goes after a

Code: Select all

?>
You need the itemid of the menu item you want to override. You will find this in the administrator area > menu > menu item -> id

Here's the code:

Code: Select all

<?php
$currentMenuId = JSite::getMenu()->getActive()->id ;
if($currentMenuId == '139') // 139 is the ID number of the menu pointing to the component
{
$this->setMetaData( 'description', 'my description' );
$this->setMetaData( 'keywords', 'my keyword' );
}
else
{
// do nothing
}
?>
Replace the currentMenuId number with your required menu item id.

Replace my description with the meta description you want.

Done.

I hope this makes sense.
Joomla Expert http://http://urlofseo.com/joomla-support-service Expert Joomla Development and Support
Joomla SEO http://urlofseo.com small and medium sized enterprises.


Locked

Return to “Search Engine Optimization (Joomla! SEO) in Joomla! 1.5”