How to Remove Date From Meta Descriptions in WordPress

Since I’ve changed my wordpress theme, I noticed that dates were being added in front of my meta descriptions in Google Search engine results page. Obviously, I first checked my source code as I thought it was my mistake, although all descriptions have been optimised correctly. I also thought that maybe those descriptions were too short/ long – that was not the case either…
Showing date in front of meta descriptions has its pros and cons though. When you update your blog very often (even a few times a day) and if you write news related posts, it is pretty useful from user perspective to know when the post was written. However, if you don’t write very often (like myself) and you cover non-news related content, showing the post date in SERP, can actually harm your Click Through Rate (CRT): First of all, the content is (usually) not fresh, secondly it does not look appealing. Therefore, I’ve decided to remove date from meta descriptions.
There are many different opinions how Google actually gathers those dates. Some of us say it is from RSS feeds or sitemaps, which might be true, although in my case the dates were taken from my blog posts.

Remove Date From Meta Descriptions- a simple solution

When I looked into source code in single.php, I noticed that automatically generated date has been included in a single div in the HTML header, just under the title, as below:

<div class=”post-meta-data”> Added <?php the_time(‘M j, Y’);?>, Under: <?php the_category(‘,’)?></div>

So what to do with this piece of annoying little code…

Google is not able to read pictures nor some javascripts, so if I don’t want Google to read the date, let’s put it into javascript and the job should done (at least for awhile).

Here is how I dealt with it:
<div class=”post-meta-data”> Added <script language=”javascript” type=”text/javascript”> document.write(‘<?php the_time(‘j’) ?>’); </script> <?php the_time(‘M Y’) ?> , Under: <?php the_category(‘,’)?> </div>

after which I resubmitted Sitemap.

When Google started crawling my pages and caching their new versions, viola! The dates for my posts Were GONE! Happy days:) (as I could not sleep because of that!)

Mags Sikora

I'm Mags, an SEO Consultant, London

  • http://www.techperk.com/ Praveen-Techperk

    Very good tutorial.I like the way this has been crafted. Keep up the great work.

  • http://magstags.com Mags

    Thank you, Praveen! Hope to see you more often here then:)

  • http://www.seostrategyhq.com/ Justin

    I haven’t experienced this problem with my meta descriptions. It’s funny because we are using the same theme : )

  • http://tech2hack.co.cc/ Ankit Saini

    Nice tutorial, Is this help in SEO or not?nThanks

  • http://www.airsoftgunreviews.net Airsoft Reviews

    This is something I noticed on my blog: the date shows up in the description from google search results just when I don’t have a meta description. nI’m using Platinum SEO Plugin to handle meta descriptions, may that be the reason?

  • http://magstags.com Mags

    Hey, no it is not the reason. I tested this issue on 22 websites with many different SEO plugins and believe me there is no rule. At the moment i completely deleted dates from my blog, but when you implement my recommendations it will work! (it worked on my blog and other people’s blog as well). If you have any problems, come back and leave me a msg and I would be happy to help you. Cheers

  • http://twitter.com/offbeatband John Marshall

    I tried this out on my blog, and it worked great! Thanks! I ended up just deleting the date metadata altogether though, as I don’t want readers – as well as Google – knowing when my posts were published. n

  • http://www.forexaffiliatesreview.com JB

    Hi Mags, would appreciate if you could help me out with this. The meta date/time is displayed using a function. I don’t want to remove the date completely but only prevent it from being displayed in meta description.nnphpopentag the_time(get_option(‘date_format’)); phpendtag

  • http://magstags.com Mags

    Hey JB,u00a0nLet me have a look into that during weekend. I will email you.

  • http://www.stylishandtrendy.com/ Dev @ Women Magazine

    Are you sure that Google won’t penalize you for hiding important piece of data from it’s crawler?

  • http://www.stylishandtrendy.com/ Dev @ Women Magazine

    Are you sure that Google won’t penalize you for hiding important piece of data from it’s crawler?

  • Julia

    I just tried it. Will be interesting to see how Google reacts.

  • Julia

    I just tried it. Will be interesting to see how Google reacts.

  • http://twitter.com/jcamwebcom jcamwebcom

    Hi, i can follow and understand reasons and advantages to don’t use metatags in wordpress but then, why you use reference time in your posts? It really sound subrealist read one post with date reference but that i can’t kown when the post was publised xD
    Regards!

  • http://twitter.com/jcamwebcom jcamwebcom

    Hi, i can follow and understand reasons and advantages to don’t use metatags in wordpress but then, why you use reference time in your posts? It really sound subrealist read one post with date reference but that i can’t kown when the post was publised xD
    Regards!

  • http://myafricanmangoreview.com EG

    Hi – thanks. My particular theme does not have a single.php and even in index.php, I do not see the_time or any function that contains the words date or time. Any suggestions? Thanks

  • http://myafricanmangoreview.com EG

    Hi – thanks. My particular theme does not have a single.php and even in index.php, I do not see the_time or any function that contains the words date or time. Any suggestions? Thanks

  • http://thecm.co.uk Chisomo K.

    hi, i noticed you’re using date meta again (based on prior comments when you said you had completely removed it).
    is there a particular reason you’ve brought it back ie seo or anything of the sort?

  • http://magstags.com Mags

    Hi Chisomo,

    I have been contacted by bloggers if it is possible to have them back, as people were confused by the luck of dates in the posts (some posts for example were out of date).

    So everything for my readers:)

    Cheers,
    Mags

  • http://thecm.co.uk Chisomo K.

    thanks for your response. makes sense, a site is nothing without its readers.
    i guess it all depends on the nature of the content. i may implement it on some sites and not others.
    thanks again