Hi,
I am not a Magento developer and I really need to display the meta title, descriptions and keywords on my website for catalog categories and sub-categories. Right now it is pulling the default meta tags set-up in the CMS.
The cms pages seems to be working fine. I used this code and paste in on /cms/meta.phtml file:
<?php if($pageData->getPageMetaKeywords()): ?>
<meta name="keywords" content="<?php echo $pageData->getPageMetaKeywords() ?>" />
<?php endif; ?>
<?php if($pageData->getPageMetaDescription()): ?>
<meta name="description" content="<?php echo $pageData->getPageMetaDescription() ?>" />
<?php endif; ?>
However, I need a codes how to display the meta tags information for catalog sub-categories pages. The sample URL key of my catalog sub category is something like this /gift.html#cat=154
PLEASE HELP ME!
I am reading and trying out a lot of suggesstions from the internet but none of it is working.
Thanks in advance.
J.
<meta> tags should be only in <head> tag, and it should be defined once per page.
It's working out of the box with Magento, you can set it by going to any Magento product / category Edit page in the Admin, there you can set everything you want.
If you try to set multiple <meta> tags on the same page, then it will not have any effect in best case, in worst case search engines will not like that.
This was happening due to Creare SEO extension.
You should remove this extension.