Date Exclusion WordPress Plugin

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.

Installation

  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

Configuration

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.

You can receive our articles for free on your email inbox, with more web design, SEO, monetization and blog tips. Just enter your email below:

47 Responses to “Date Exclusion WordPress Plugin”

  1. Tejvan Net Writing on June 11th, 2007 6:33 am

    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

  2. Daniel on June 11th, 2007 6:40 am

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

  3. Oz on June 11th, 2007 8:29 pm

    Hi

    Sounds like a great plug in

    Unfortunately it was doing nothing for my site.

    Date was still being stamped on each post.

    Any ideas ?

  4. Daniel on June 12th, 2007 3:12 am

    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.

  5. Ryan on June 12th, 2007 6:13 am

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

  6. Oz on June 12th, 2007 6:03 pm

    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

    Cheers

  7. trakin on June 14th, 2007 4:19 am

    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…

  8. Stephen on June 14th, 2007 5:40 am

    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.

  9. Dana on June 14th, 2007 6:30 am

    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!

  10. trakin on June 14th, 2007 12:45 pm

    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’); }

  11. Genesis on July 6th, 2007 3:03 am

    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.

  12. Daniel on July 6th, 2007 5:34 am

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

  13. Transcriptionist on August 9th, 2007 6:22 pm

    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.

  14. Transcriptionist on August 9th, 2007 6:23 pm

    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.

  15. Top Ten Wordpress Plugins of MT Herald | MT Herald Dot Com on August 12th, 2007 9:56 pm

    […]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[…]

  16. Clifford on August 23rd, 2007 4:43 pm

    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.

    thks

    clifford

  17. BrilliantJeni on August 24th, 2007 4:12 pm

    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. ;)

  18. BrilliantJeni on August 24th, 2007 4:15 pm

    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.

  19. Stacey on September 7th, 2007 6:03 am

    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?

  20. jtbloom on September 15th, 2007 6:45 am

    I have tried this plugin on both of my blogs http://www.stylechatter.com and also http://www.subastralinc.com/blog, I went through all the steps listed on activating the plugin as well as changing the value to yes in the date-exclution.php file, nothing happened. The date is still showing on both blogs. Each of my blogs is a different version of wordpress, so I don’t think it is the versions I am using, could there be a conflict with another plugin or possibly issues with the theme I am using. Any ideas on what the problem could be?

  21. BrilliantJENI on September 16th, 2007 3:16 pm

    Here you go Stacey- I put a snapshot up here: http://www.brilliantjeni.com/2.....ss-plugin/

    Nothing too detailed, but it shows you exactly where to make the “no” to “yes” change in your Date Exclusion file using the plugin editor.

  22. Matt on October 1st, 2007 9:07 am

    works perfectly

  23. Bryan on October 6th, 2007 9:15 am

    Hello!

    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!

    Bryan

  24. David on October 14th, 2007 6:13 am

    Hi,

    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.

    Cheers

    David

  25. kenshiz on November 1st, 2007 7:00 am

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

  26. Jacob Share on November 25th, 2007 11:34 am

    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’);

  27. DotDriven on December 28th, 2007 3:00 pm

    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!

  28. Glen at Webstart on December 30th, 2007 1:52 pm

    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.

  29. Stefani on January 8th, 2008 12:06 am

    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.

  30. Steve on January 9th, 2008 11:37 am

    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”.

  31. kento on January 22nd, 2008 5:09 am

    Is it works with WP 2.3.1 ++ ?

  32. David on February 6th, 2008 8:54 am

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

    Can you give an example of how to set to a custom field?

  33. PeterL on February 25th, 2008 1:49 pm

    Thanks for the plugin. Works perfectly with WP 2.3.3

    However, it just strips the date, and I am left with some non PHP blurb on each side of it, which doesn’t disappear.

    For example: “Written by PeterL on Dec. 13, 2007 at 4:00 pm”, becomes:

    “Written by PeterL on at ”

    Any ideas how to work around this?
    Peter

  34. Jon on April 21st, 2008 8:55 am

    Just tried this on my wordpress 2.5 blog and can’t get it to work either for all posts, or for an individual post.

    Any ideas?

    My theme uses the the_time function.

  35. Jon on April 21st, 2008 9:56 am

    Further testing reveals that it works for a single post (single.php), but not for the mail index loop (index.php).

    Any ideas?

  36. Jon on April 22nd, 2008 3:56 am

    See from previous posts that current plugin does not remove date from index.php.

    So, added code in the index.php to check for the exclude_date custom field and all working fine.

  37. Grant on July 11th, 2008 10:05 am

    this plugin wont even show up in the my plugin admin to activate
    any ideas?

  38. Healty Guy on July 30th, 2008 8:34 pm

    I use Wordpress for a number of different sites. For one project I’m using it as a small CMS, and as such I want to turn off the Time and Date functions as they are not that relevant to what I’m doing.

    So I searched and found this page. Unfortunately a year later the Plugin has not been updated to do more than turn single post dates off. This wasn’t enough for what I want to accomplish with this project.

    So I downloaded and installed the plug in (WP 2.5) and enabled it then turned on the feature with “Yes”. And the individual posts did in fact stop displaying dates. However there was a remnant from my template that did display and did not look good. And the dates were not removed from categories so it didn’t work on it’s own for my purpose.

    So I backed up the templates index.php and archive.php files. Then I removed 2 lines of code from each that execute the display of date and time.

    Next I edited the css file to remove the date png graphics.

    And it appears everything is now working fine with no time or date in the way.

    I am still using the plugin to disable display of time and date to the individual posts.

    Wordpress has so much more potential if they would include “simple” features like date removal so it could be used much easier for a wider variety of applications.

  39. Healthy Guy on July 30th, 2008 8:37 pm

    I can’t spell worth a damn.. or type worth a damn.

    I don’t know what a Healty guy is.

    Supposed to say Healthy Guy.

    sorry

  40. Erika on July 31st, 2008 3:39 am

    would like to remove dates from PAGES but keep them on POSTS. Esp would like to remove date from home page.

  1. Weblog Tools Collection » Blog Archive » Wordpress Plugin Releases for 6/14
  2. WordPress Plugins Database » Plugin Details » Date Exclusion
  3. 24h Blog » Blog Archive » Date Exclusion WordPress Plugin
  4. Do You Want To Remove Dates From Your Blog Posts?
  5. Wordpress plugins, widgets, themes, blogging for money : Timestamp - Yes Or No?
  6. Wordpress magazine: SEO and some plugins info | Wordpress Insights
  7. To Date Or Not To Date? | Streamxy - The Next Internet Rush

Got something to say?





Sponsors

Online Invoicing For Freelancers Premium WordPress Themes Why I recommend Doreo Hosting Maximize Your Rankings Twitter Style Social Bookmarking

Popular Articles

Recent Articles

Subscribe via E-Mail


Killer Domains eBook