Timeframe Posts List Plugin


Timeframe Posts List is a plugin for WordPress that allows building published posts list and displaying them into another post.

It uses two given mandatory parameters named « Start Date » and « End Date ». These dates represent the timeframe boundaries for querying the database and retrieving posts that were published in-between.

It can be used both using PHP into a page template and using the provided shortcode into a post.

How to use Timeframe Posts List?

Shortcode

The most straitforward way to use this plugin is to insert the shortcode (remove the dot after « tpl »):

[ tpl  startdate="01-01-09" enddate="10-01-09"]

PHP

Alternatively, you can use the function get_posts_in_timeframe directly in a PHP template.

There are several additional and optionnal parameters.

Ordering

You can change the default ordering by using either « DATE_ASC » (ascending regarding dates) or « DATE-DESC » ‘descending regarding dates).
For the time being only these two ordering options are supported but I plan to add some other ones depending on requests.

Debug

For debugging purposes, you can activate the debug (debug parameter) mode which displays the SQL query into the post itself. This is very helpful to see what will be displayed.

Max number of posts

For performance or paging purpose, you can limit the number of posts to retrieve (max_posts parameter). Default value is 100. You can suppress this limit by setting the value "-1". Be careful to not unlock the limit (by putting the value -1) when trying to display large timeframes.
Otherwise you’ll kill the database.

Categories

You can restrict the categories you want to display by using the parameter categories.
You can pass several categories IDs by using the following syntax: categories="1,3,8,12"
Notice that if the post belongs to at least one of the given categories, it is displayed.

Support

I provide support for this plugin during my spare time. If you want specific features to be added, please post a comment and I’ll do my best to implement it if relevant.

Download Timeframe Posts List plugin for WordPress