Hi Friends, After the research i find out the solution. How to disable adding noodp meta tag in yoast plugin on your website without harming other meta tags of seo.
What is the problem?
<meta name=”robots” content=”noodp”>
This above tag is showing on every page. This tag stops Google and Dmoz to catch it. In the yoast plugin this issue is there.
What is the solution?
You have to follow few steps to solve the issue. These steps are
Step1: Login your admin panel.
Step2: On the left hand side click on plugin and then its editor.
Step3: Choose the yoast plugin on top right side of a panel.
Step4: In the right hand side find class-frontend.php and click on it
Step5: Go to lines 1892 in same file.
Step6: You can see below code.
private function add_robot_content_noodp( $description ) {
if ( ! ( empty( $description ) ) && $this->options['noodp'] === false ) {
$this->options['noodp'] = true;
}
}
Step7:
Replace this code.
private function add_robot_content_noodp( $description ) {
if ( ! ( empty( $description ) ) && $this->options['noodp'] === false ) {
$this->options['noodp'] = false;
}
}
Step8:
Save your file.
After saving the file remove the cache and see the source code.
<meta name="robots" content="noodp">
This Above code is not there.
If it is still there than Go to
SEO -> Titles & Metas -> OtherĀ and find you check the noodp or not.
Unchecked it and see the source code.
Your problem will solve.
Read About Other Interesting Things below.
I hope you will like Add Adsense Ads Between Posts In WordPress Without Any Plugin. If You found it useful please subscribe my blog.
Categories: Search Engine Optimization
Thanks
Please, find a function to add in functions.php so that I don’t have to edit the file each time there’s an update
thanx
Ok Julien, I try to find out the solution
Hello, thanks for the solution
thank you for your solution .. i made it ..
This is Amazing !!!!
This trick worked very good .
Thanks alot
Thanks for taking time to post this
thsnks bro
Thank you very much it is very helpful and working well. I would like to inform you i.e. after the latest update the codes are little different and you need only to replace the word with (false) in both the places in place of (true).
that was awesome. thaaanks a ton. let me kis you
Most Welcome
The real solution is to change from
$this->options[‘noodp’] === false
to
$this->options[‘noodp’] === true
and the final code will be
private function add_robot_content_noodp( $description ) {
if ( ! ( empty( $description ) ) && $this->options[‘noodp’] === true ) {
$this->options[‘noodp’] = true;
}
}
In this way you can use “Force noodp meta robots tag sitewide” option into WP-ADMIN / Yoast plugin /
Titles & Metas – Yoast SEO to switch on or off the noodp
Hi Nick,
Thank You For commenting
I am appreciating your response but i wrote down my article for non developer who have less experience in coding.
Perfect thank you
This issue with noodp can drop sites in googl rank ?
Yes it drop your website rank
If you have removed the noodp tag from the code. you website rank is not drop by this code
white screened my site…nice! Thanks…..