Thursday, April 05, 2018

WordPress yoast plugin remove date or article:published_time

Yoast is an essential plugin for WordPress SEO. It is one of the best SEO plugin for wordpress right now. But, after disabling date from search result from Yoast setting it still appears in google search result. So, from the source code I found that "article:published_time" property is responsible for this. Now lets see how to remove that "article:published_time" property form wordpress.



WordPress




From WordPress Dashboard go to Appearance > Editor. Find functions.php from Theme Files (Right side).


Now paste the following code anywhere in this file.


add_filter( 'wpseo_og_article_published_time', '__return_false' );
add_filter( 'wpseo_og_article_modified_time', '__return_false' );
add_filter( 'wpseo_og_og_updated_time', '__return_false' );

And update the file. Now open any post and open the page source (CTRL+U) and find for article:published_time. You won't find it because its gone!

Hope it helps you. Please share if it works for you.

No comments:

Post a Comment

!! COMMENT HERE FOR ANY PROBLEM !!

Featured post

WordPress yoast plugin remove date or article:published_time

Yoast is an essential plugin for WordPress SEO. It is one of the best SEO plugin for wordpress right now. But, after disabling date from ...