7

How can i remove <meta name="keywords" content="keyword"/> from head through layout.xml?

10

This is not possible via layout.xml, you have to copy the template file page/html/head.phtml to your theme and remove the following line:

<meta name="keywords" content="<?php echo htmlspecialchars($this->getKeywords()) ?>" />
  • Thanks for the speedy response! I am tweaking a small SEO module and was looking for a unobtrusive way to remove the keywords tag.Would it be possible to do through an observer that gets access to the head block? I tried to get something like this working but could'nt -> $headBlock->removeItem('meta_name','keywords') – Sebastian lockwood Feb 18 '15 at 16:43
  • @Sebastianlockwood not without any black regular expression magic since there is no extra block or event for the meta keywords. – Simon Feb 18 '15 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.