Date Exclusion WordPress Plugin


background image

Would your blog benefit from removing the dates of the posts? That is the question I asked on the post “Should We Remove the Timestamp?”. The feedback from the readers was divided. Some people believe that the timestamp is necessary, while others think that removing the date from posts could have advantages, like increasing the number comments and linkbacks for the older content .

It is probably a subjective matter. Removing the date will work for some blogs, and not for others. Regardless of that choice, a lot of people are not comfortable with editing the WordPress theme files to remove the timestamp. Secondly, the raw editing of such files do not provide flexibility. You can either keep the dates on all the posts or removed them all, there is no in between.

With that problem in mind Stephen decided to code a plugin, called Date Exclusion.

Date Exclusion Plugin

This WordPress plugin gives the user complete control over where and when the timestamp will be displayed. You can exclude them from all posts by default or only on posts older than a few weeks or months. You can also exclude or include dates on a post-by-post level through WordPress’ custom field feature.


  1. Download and unzip the plugin file
  2. Upload the date-exclusion.php file to your /wp-content/plugins/ directory
  3. Log into your WordPress control panel, click the “Plugins” tab, and click “Activate” next to the Date Exclusion plugin


In order to configure the plugin for your needs you will have to open the plugin file (date-exclusion.php). You can do this on the Plugin Editor inside the WordPress control panel.

To exclude date information from all posts by default, set $exclude_date on line 30 equal to ‘yes’. This can be overridden on a post-by-post basis by setting “exclude_date” as a custom field with a value of “no”.

To set a default period of time for every post after which date information should no longer be displayed, set $date_expires on line 33 to the number of days to wait (e.g., 14 for two weeks). This can be overridden on a post-by-post basis by setting “date_expires” as a custom field with a different value (or 0 to deactivate).

To exclude date information from a specific post, set “exclude_date” as a custom field with a value of “yes”.

To make the date of a specific post no longer display after a certain period of time, set “date_expires” as a custom field with a value equal to the number of days you want the date to display.

Version History

Still on the initial release (1.0). Please leave a comment if you encounter any difficulties.

Browse all articles on the WordPress category

85 Responses to “Date Exclusion WordPress Plugin”

  • kento

    Is it works with WP 2.3.1 ++ ?

  • Steve

    I want to exclude the date from my first sticky post only. Where do I set the custom field as described below? Thanks.

    To exclude date information from a specific post, set “exclude_date” as a custom field with a value of “yes”.

  • Stefani

    Seems to be working for me on the blog I set it up on. At first I thought it wasn’t working but after reading the comments, I realized it doesn’t work on the homepage posts but it does on the individual posts when you view them.

  • Glen at Webstart

    Got the plugin working nicely on WordPress MU – did have an issue with a few themes not working with it and they seemed to use only the_date and the_time functions – I’m not sure why they didn’t work but most do.

    Thanks for the great plugin.

  • DotDriven

    Thanks for this plugin! I like the idea and could really use something like this for some of my blogs but need something that also pulls the date off the homepage post as well, not just single post.

    I know it has been a while since this was posted but were there ever any updates?

    Thanks again!

  • Jacob Share

    I’m playing with the plugin right now, here’s a clarification:

    1) Why are alot of people saying that nothing happened? It may be because of line 36 in date-exclusion.php:

    $deactivated_functions = array(‘the_date’, ‘the_time’);

    However, many themes like mine actually use another function, which I needed to add like this:

    $deactivated_functions = array(‘the_date’, ‘the_time’, ‘get_the_time’);

  • kenshiz

    Hey, i can’t get this working on my blog…so sad…
    any tips would be appreciate! ^_^

  • David


    I thought this was the exact plugin I needed but I really need one that on a post by post basis gives me the option to remove the date stamp from posts on the home and category pages too.

    Any news on adding this functionality? Happy to donate something to have this as a working feature.



  • Bryan


    I installed the plugin and it’s a great idea, but it only takes away the date from the posts and not anywhere else. I don’t mind having dates on the front page, but would prefer no dates anywhere else on the blog. Just removing dates from a post doesn’t really help when folks nav through the cats and see the dates… also the comments have dates too, so, although I like the idea of the plugin, it doesn’t really do a lot that is wanted — it is a great idea, just needs to be expanded… will you expand the plugin so that there are no dates to be found with the exception of the index or frontpage? Thanks tons!


  • Matt

    works perfectly

  • BrilliantJENI
  • Stacey

    This is so frustrating, Can someone please copy and paste the section I need to change for this to work.

    It says its defaultly set to exclude dates, but it doesn’t seem so because we have to make changes right? Then its not by default is it?

  • BrilliantJeni

    Ohhh- what about taking the time stamp from comments as well? Comments would obviously run longer if they weren’t dismissed over the time factor.

  • BrilliantJeni

    I’ve been waiting for a plugin like this since the first day I implemented WordPress on my sites. I think it’s absolutely essential that timestamps are removed from posts- they magically become referred to as “articles” rather than “posts” when the timestamp disappears which not only makes them “timeless” but also more credible, in a sense.

    I’d like the option to take them from the front page as well and on multiple post pages as well, but so far- this works great on most of my sites. Just one that it didn’t work on, but luckily, that’s just a frivolous site I have around for kicks and a little extra revenue. 😉

  • Clifford

    hi, thks for plugin. I’ve changed the $exclude date to yes as suggested. however the date and timestamp still shows on my first post as this is a new blogsite. I’m currently using justsimple free template..any help would be appreciated.



  • Top Ten Wordpress Plugins of MT Herald | MT Herald Dot Com

    […]Gives your blog a feeling of freshness by turning off the display of date information after a specified number of days or immediately after posting. Exclusion of date information can be set by default in the plugin file and/or manually for each post. Find the details, installation guide, configuration etc., at Daily Blog Tips[…]

  • Transcriptionist

    Thanks, that’s a great plugin especially to help those articles suiting all times. You could see it in action at my blog except the home page. I was in search for such a plugin all over the internet.

  • Transcriptionist

    Thanks, that’s a great plugin especially to help those articles suiting all times. You could see it in action at my blog except the home page.

  • Daniel

    Genesis, the plugin does that. It just does not touch the homepage posts.

  • Genesis

    It would be very useful to be able to remove all timestamps. I am starting a wedding blog and the information there is timeless, so I would love to be able to remove dates from my archives as well.

  • trakin

    I am not too technically proficient, hence I am putting the complete code here.

    if (! is_page()) { // Do not display if we are on a page
    // Date and author
    if (is_single()) { $articledate = get_the_time(‘j. F Y, G:i’) . ‘ Uhr’; } else { $articledate = get_the_time(‘j. F Y’); }

  • Dana

    I like this plugin and it does work for single posts.

    I would LOVE to have it expanded for the index page as well as the category/archive pages 🙂

    Thanks for this contribution!

  • Stephen

    Out of curiosity, what are you using to display date information in your template, Trakin? The plugin works by disabling specific functions. The initial release only disables the_date() and the_time() by default.

    Something else I probably should’ve mentioned is that the plugin will only disable date functions on single post pages. Is there anyone who wants this feature expands to category and/or archive pages? If so, I’ll add it into the next release.

  • trakin

    It does not seem to be working on my blog either. Actually, nothing happens – I st exclude date to “yes” and expire to 15 days and nothing happened. Infact I tried excluding dates from all the posts, but did not seem to work. Neither on single page – nor in category pages…Had to deactivate it…

  • Oz

    Yeh – I did do that

    Odd I guess – must be conflciting with something else.

    Had to deactivate – I’ll try again when you release a new version


  • Ryan

    Very funny plugin man~
    It works on my site. But I still delete it, because I remove all timestamp on my blog.

  • Daniel

    Oz, both Stephen and I tested the plugin, and it was working.

    After activating it, did you open the plugin file to configure it? Because just activating it will not make any change.

    Try opening the plugin file and setting the “$exclude_date” value to “yes”. Check if the dates are gone from the single post pages now (they should).

    Let me know how it goes.

  • Oz


    Sounds like a great plug in

    Unfortunately it was doing nothing for my site.

    Date was still being stamped on each post.

    Any ideas ?

    • Marina

      I would also like to lose the date option on my news items.

      I downloaded and added your plugin and activated it. I then edited it as per your instructions. However due to the permissions settings it wasn’t possible to save the changes in WordPress.

      So I then edited it via the back end of my website using text wrangler. The changes then appeared on the text of the plugin on my website, so I know I managed to do it ok.

      However the date is still showing. I am now wondering whether I did the correct editing? I set the date to expire on the post after 2 days but left the other lines alone.

      I didn’t edit anything in the area where it said don’t edit below this line.

      Any help would be appreciated (and thank you for taking the time to make this plugin)

  • Daniel

    Actually the plugin will not touch URLs, it will just take care of the timestamps within posts.

  • Tejvan Net Writing

    looks good i use /%category%/%postname%/ for some blogs, in custom permalink, but it would be good to have option to switch between blogs, although it might look a bit strange to keep switching url style

Comments are closed.