How can i remove
<meta name="keywords" content="keyword"/>
from head through layout.xml?
1 Answer
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')
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.– SimonCommented Feb 18, 2015 at 16:47