You know Google shows the publish date on the search results page (SERP).
Problem-I (showing date on old published blog posts):
- For new blog posts which are recently published may have a positive effect on the Google’s SERP. Searchers may click on your fresh URL more often.
- However, for a blog post published long back (say, 3 or 4 years back) may not have the same positive effects on the SERP. Searchers may not click on old or outdated URLs.
Solution to Problem-I:
- Instead of showing the published date, you can show the last modified date.
- This way, when you update an old blog post, the last modified date will be shown on the Google’s search result page.
- This naturally increases Click-Through-Rate (CTR) on the SERP
Problem-II (showing date on outdated and old blog posts):
- For blog posts that are not updated for long time.
- For example, in my blog there are articles still showing the last modified date of 6 years back.
- This badly affects CTR on the SERP.
Solution to Problem-II:
- Disable dates on these older and outdated (non-updated) blog posts.
- And, you can show the last modified date only on the blog posts which are recently modified.
- You will be showing date on blog posts which are recently published & also, those which are recently modified.
- You will not be showing date on blog posts which are outdated.
- You can set up to show date only for all the blog posts which are modified after 2014.
- And, disable date on blog posts which are not modified after 2014.
Source Code to Disable Date only on Older & Out-dated Blog Posts.
$modified_year = get_the_modified_date();
$modified_year = date(‘Y’, strtotime($modified_year));
if (intval($modified_year) > 2014)
echo “Last updated on “; the_modified_time(‘F jS, Y’); echo ” by <em>”; the_author(); echo “</em>”;
echo “by <em>”; the_author(); echo “</em>”;
- Example blog post 1: Published on 2009 + recently, updated – you can see the date showing
You can just copy the above source code and use it on Single.php where your theme is already showing the post publish date.
Hope the source code helps you to disable date on Google’s result page for older/outdated blog posts.
Let me know, if you have any doubts in using this source code.