-
I’ve asked several times on wordpress.org and it keeps getting marked as resolved even though its not. When I respond, nobody responds.
My homepage appears in google with a date next to the meta title. This is not wanted. Its fine for posts but shouldnt be for pages. I can see testing schema validation that in the output for oragnisation schema from rank math
datePublished 2025-02-28T10:49:18+00:00
dateModified 2025-03-14T12:13:31+00:00My guess is, Google is picking this up and using it to display a date next to the results. This impacts CTR in a bad way for evergreen content which is not updated frequently.
I’ve added this to functions.php but I still see the dates as above in validator.schema.org
Please advise how to remove this. I have asked a few times but keep getting the topic resolved before its actually resolved.
add_filter(“rank_math/snippet/rich_snippet_article_entity”, function($entity) {
// Only apply to pages and homepage, NOT to posts
if (is_page() || is_front_page() || is_home()) {
unset($entity[‘dateModified’]);
unset($entity[‘datePublished’]);
}
return $entity;
});// Remove OpenGraph date meta tags on all pages (including homepage)
add_filter(‘rank_math/opengraph/facebook/og_updated_time’, function($time) {
if (is_page() || is_front_page() || is_home()) {
return false;
}
return $time;
});add_filter(‘rank_math/opengraph/facebook/article_published_time’, function($time) {
if (is_page() || is_front_page() || is_home()) {
return false;
}
return $time;
});add_filter(‘rank_math/opengraph/facebook/article_modified_time’, function($time) {
if (is_page() || is_front_page() || is_home()) {
return false;
}
return $time;
});Essentially, I don’t want dates to be included on pages in the schema. As I am not adding it, but can see it in validator.schema I assume it coming from the organisation schema. Please tell me how to remove this for all pages. I want to keep it on posts, but I don’t want it on pages and I have no idea why this is a default behavior. Why would someone want dates appearing next to evergreen content? Its going to negatively impact CTR.
The ticket ‘Remove datepublished and datemodified from organisation schema / pages’ is closed to new replies.