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
- Download and unzip the plugin file
- Upload the date-exclusion.php file to your /wp-content/plugins/ directory
- 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.
Related Articles
Bookmark
47 Responses to “Date Exclusion WordPress Plugin”
- Weblog Tools Collection » Blog Archive » Wordpress Plugin Releases for 6/14
- WordPress Plugins Database » Plugin Details » Date Exclusion
- 24h Blog » Blog Archive » Date Exclusion WordPress Plugin
- Do You Want To Remove Dates From Your Blog Posts?
- Wordpress plugins, widgets, themes, blogging for money : Timestamp - Yes Or No?
- Wordpress magazine: SEO and some plugins info | Wordpress Insights
- To Date Or Not To Date? | Streamxy - The Next Internet Rush



Subscribe to our RSS Feed






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
Actually the plugin will not touch URLs, it will just take care of the timestamps within posts.
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 ?
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.
Very funny plugin man~
It works on my site. But I still delete it, because I remove all timestamp on my blog.
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
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…
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.
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!
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’); }
“
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.
Genesis, the plugin does that. It just does not touch the homepage posts.
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.
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.
[…]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[…]
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
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.
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.
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?
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?
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.
works perfectly
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
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
Hey, i can’t get this working on my blog…so sad…
any tips would be appreciate! ^_^
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’);
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!
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.
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.
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”.
Is it works with WP 2.3.1 ++ ?
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?
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
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.
Further testing reveals that it works for a single post (single.php), but not for the mail index loop (index.php).
Any ideas?
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.
this plugin wont even show up in the my plugin admin to activate
any ideas?
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.
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
would like to remove dates from PAGES but keep them on POSTS. Esp would like to remove date from home page.