If your posts are “timeless”, the post date that is shown in google’s search results may significantly limit the number of visitors you receive. It may lower the click-through rate to your website and as a side effect lower your rankings. For many queries the date-stamp is a good indicator whether that particular result is what you’re after. However in some cases, where post date doesn’t matter at all, but it’s still being displayed in the SERPs, you would want to consider hiding it from the search engines or completely removing it. In such cases you will notice two positive effects following your modification; more visitors and SERP increase.

Why Would You Display Information That Might Negatively Impact Your Website?

Delete Date Serps

Let’s make an example. You’re searching for a pancake recipe and you find two results in the SERPs that are very compelling to you. One is dated 2006 and the other one is dated as being two months old. You are very likely to pick the most recent date, but that doesn’t mean the recent recipe is better and more delicious than the one from 2006. Chefs were just as good at that time as they are today. You see the concern here is that your website might get lower ranking through absolutely no fault of yours. Less people might click on your webpage in the SERPs, because of the date and human nature.

Hide It Or Remove It?

There are many reasons for keeping the date visible to the human eye. It reassures people the content is fresh and that they are reading the right content. That’s why you have two options. Removing the date completely to both the visitor and search engine, or hide it from the search engine only.

Removing The Date From A WordPress Blog

WordPress is a popular platform. That’s why we’ll use it for this example. But you can use these same steps and just modify it a little for any kind of script/platform. You just need to find that part of the code that is displaying the date and comment it out or remove it.

Google’s date-stamp feature may be picking up the date not only from posts and pages, but also comments. So you need to edit them all.

Go to your wordpress backend and edit your theme files. You need to edit the page, post, index and category file and remove any or all of the following code: (Watch for spaces before and after the “?”)

 < ? php the_time(‘F j, Y’); ? > or < ? php the date();? >

In your comments template you will see this code:

 < ? php comment_date('F jS, Y') ? > at < ? php comment_time() ? >


 < ? php comment_date() ? >

The code might differ a little from theme to theme, but if you look for the “commentmetadata” div class you will see what exact part of the code needs to be modified. Furthermore, sometimes this php function will be hardcoded into the core files of wordpress and even if you edit it out of the template, the dates might still remain. You can solve that with editing the CSS {visibility:hidden;}.

.commentmetadata {
.commentmetadata a {

Hide The Date

In order to hide the date from search engines, but still keep it for the visitors you will use a javascript code and just wrap it around the existing php code.

<script language=”javascript”> document.write(‘YOUR PHP CODE‘); </script>

The reason is because google does not display what’s inside that javascript code. For example if you want to display the comment date to your visitors and hide it from SE, you will use:

<script language=”javascript”> document.write(‘< ? php comment_date(‘F jS, Y’) ? > at < ? php comment_time() ? >‘); </script>

Did you like this? Share it: