As most of us know that Google can read anything which is written in plain text. Same goes for the date. The date may be useful to our readers but when we are doing blogging for many years with good Google Search Result position.
Most of the people check the freshness of the article by date and want to read the latest available one. So when we Remove Date from Google Search Result, there is a higher chance they will click on your blog, and you will get the high amount of traffic.
Also Read: Best Managed WordPress Hosting That You Should Try
In this post, we are going to see three methods by which you can achieve this. So let’s get started:
Table of Contents
Steps to To Remove Date from Google Search Result
Method 1: Using JavaScript
For this we have to modify your theme file especially these three files need to be updated index.php for the homepage, single.php for the single post, archive.php for archives.
Warning: Please backup all the above three files, so in case something goes wrong you can restore it back to get your blog working.
-
- Open up the WordPress Editor from Appearance or Go to your hosting panel file manager and go to the root of your active theme folder.
- Find those three files which were discussed above. (These are the general file names used in most themes. In some cases, there are different names in my case it was not single.PHP, it was loop-single.php)
- Find this code in those files.
<?php the_time('F jS, Y') ?>
- Replace that code with following and save those files.
<script language="javascript" type="text/javascript">document.write("<?php the_time('F jS, Y') ?>");</script>
Note :-
- If the date is appearing on any other page of your blog, you can edit that particular file and repeat the same process as illustrated above.
- If the above method does not work and still you wanted to remove the date from Google Search Result then you have to remove the <?php the_time(‘F jS, Y’) ?> from your theme file, But this will also remove it from readers.
Method 2: Using Yoast SEO Plugin
- Download Yoast SEO plugin from wordpress repository.
- Go to your WordPress Dashboard -> SEO -> Titles & Metas -> Post Types.
- Select Hide in Date in Snippet Preview option.
Method 3: By Removing Date Manually or Using Theme Settings
Some themes provide inbuilt functionality in their settings menu to show and hide post date. You can remove the date from the frontend to prevent it from appearing in Google search results.
If your theme doesn’t have this inbuilt option and then you can try finding the PHP file where the code is inserted and remove that code manually.
Now when Search Engine crawlers fetch your site, they are not able to read the date and hence it will not appear in Search Result.
Also Read: Display Last Updated Date in Newspaper WordPress Theme
Thank you for reading this post and keep connected to Tech Arrival to continue enjoying wonderful posts. Share your views about this post in the comment section below. If you are still having any query throw it in the comment section.
If you find this post helpful, don’t hesitate to share this post on your social network. It will only take a moment, and also it is quite easy and helpful for others.
Hi, Mehul
I have a newspaper theme and I want to hide date and author option in all from the home page so, pls. help me how can I do it.
Hello Harsh,
It is very easy. Follow these steps:
1. Go to your WordPress Dashboard -> Newspaper -> Theme Panel -> Block Settings.
2. Click on “Meta info on Modules/Blocks” to expand it.
3. Disable/Enable the things you want.
Hope it helps!
Hello i want to hide dates shown on the posts on google search?
Follow the tutorial. Let me know when and where you get stuck. :)
Does the javascript method remove the date from SERP but visible on post?
I want to hide date from SERP, not from readers.
I think the best way to remove it is from the theme itself, Manually via Theme Editor if your theme does not support hiding date.
Actually, I want to show date for readers but not to Google.
Oh I misunderstood. I think you can try the JS solution first. It will a DIY project. :)
Hi, good article
but before i try im still wondering does this practice not a violate google ?
Hello,
As far as I recall there is no official Google restriction on hiding date and nor it is mentioned in any official guidelines. If you have read it somewhere from the official Google source then let us know we will mention it in the article. :)
Hi, I tried to get a proper solution to remove date from page search query. Though I am using Yoast. But the latest version doesn’t support that. If I change it manually does it make impact on SEO?
Now, you will need to remove the date manually from the code of the theme. You also need to make sure that any date does not appear in the article published/updated. Though I have not tried this personally but seen many big sites using the same strategy to remove date from Google Search Results.