How to set expiration date for a post using custom fields?
18 November 2009
No Comment
Custom fields provide a strong tool for developers to make it more user friendly and customizable.
Today, we will see how we can assign an expiration date to a post, so the post will disappear after a particular date:
1) Change the default loop in your index.php file as mentioned below:
2) Now, when you add/edit a post, add a custom field expiration and assign the date as value(with the format mm/dd/yyyy 00:00:00). The post will disappear after that date from the home page.
Note that if you do not assign the custom field to a post, that post will not appear on your home page. This code needs some modification for the same.
You may like these articles :
- How to Digg your wordpress post? Please follow each step carefully. 1) Register at digg.com. You...









Leave your response!