Below line of code is present in my template’s head.phtml
<meta name="keywords" content="<?php echo htmlspecialchars($this->getKeywords()) ?>" />
But when I view source of page the meta keywords tag is missing. Somehow Magento is removing the entire tag.
Can you please tell me how to fix it?
4
Answers
This was happening due to
Creare SEO
extension.Did you refresh the Magento cache?
Maybe also clear your browser cache.
If this doesn’t work, try adding a dummy meta tag:
Then refresh the cache again:
Let me know if this works for you.
did you edit the code in your template folder or the core base? you have to edit the default head.phtml in
app/design/frontend/base/default/template/page/html
and if this is where you changed it, make sure you save your old version in-case you need to revert back, in this case i usually just add () around the file name so i know its the previous version. Now try the following new version. the code should be the following:
Once you have reverted, log in to your admin panel, navigate to system/configuration/design scroll down and enter your keywords into the field. Separate each with a comma. Sign out of admin. Clear the browser cache, and sign back in.
As @tahir-yasin mention this is due to Creare SEO, but you don’t need to uninstall this extension. Go to your Settings>Configuration>
In CREARE SEO find General Settings and change ”
Disable Meta Keywords Tag and Empty Meta Description Tags?” to “No” your problem will be solved..