7

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

1 Answer 1

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()) ?>" />
2
  • 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') Commented Feb 18, 2015 at 16:43
  • @Sebastianlockwood not without any black regular expression magic since there is no extra block or event for the meta keywords.
    – Simon
    Commented Feb 18, 2015 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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