While reading articles on websites i follow, I found out in one of the blog that when a post is over four years old, a notification stating that the post is old was displayed.
A similar notification is also found in WordPress plugin directory when a plugin hasn’t been updated in over two years.
I wrote a WordPress plugin called Alert Post is Old that displays a similar notification when a post is over X-years old where “X” is an integer that denotes the number of years that defines old.
The plugin will provide you the option to specify your own custom notification sentence and the number of years before a post is considered old.
I wrote a tutorial over at Tuts+ on how the plugin was developed.
Read the full tutorial =>How to Build a WordPress Plugin to Identify Old Posts.
The plugin is available freely for use at the WordPress plugin repository.
How to use the plugin
The plugin is quite easy to set up. Firstly, install and activate it.
On the plugin settings page, the following are the form fields available.
- Notification to display when post is old – Enter the notification message to be displayed when a post or page is old
- Number of years for a post to be considered old – Enter an integer that denotes the number of years that a post is considered old.
For example, if you the digit “2” is entered, it means post/page should be considered old when the age is equal to or greater than 2 years. - Where to display notification? – Give you the option to display the notification only in a post or page or both.
Below is a screenshot of a post that is old with the notification displayed.
Head over to WordPress plugin repository to grab your copy.