Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Remove meta description?
almostbasic
New
According to Google, it's better to have no description than a duplicate., so I am trying to remove the meta description from paginated pages.
I know you can edit the description with $sender->Head->addTag('meta'... but how can I completely remove it? I don't want an empty description, I want no description tag on the page at all. Is this possible? Is there a reverse to Head->addTag?
0
Comments
https://support.google.com/webmasters/answer/35624?hl=en#1
It is nothing to do with SEO which meta description has nothing to do with these days. It is just they may not display the boiler plate on searches. I wouldn't worry.
grep is your friend.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Thank you. I'm not sure I'm using it correctly though. I tried both of these, and neither worked, am I missing something?
$sender->Head->ClearTag('meta');
and
$sender->Head->ClearTag('meta', 'description');
Thanks for the help!
If you don't want to adhere to x00's suggestion and you want to know mechanics.
this should help you with your experimentation.
here is an example of an addTag with a meta and description. Should be a similar way through ClearTag.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
where are you putting the code?
grep is your friend.
In a custom plugin in this function:
public function discussionsController_render_before($sender)
you would need to use the
beforeToString
hook, as the head module is during render.However there is a better way.
in your hook do
$sender->description(false);
grep is your friend.
You could have also added a meta tag to tell search engines to ignore the description. Either way this does very little.
grep is your friend.
should work
grep is your friend.
@almostbasic: Where did you read that Google recommends empty descriptions?
I read this here: