query_posts()

Retrieving Posts Within A Date Range

by LunchBox on March 12th, 2010 in Hacks

If you develop WordPress themes, you have probably come across the need to display posts within a certain range of dates. Unfortunately, this isn’t something you can easily do within the query_posts(); function. However, you can still do this by creating and running a filter. Add the following code BEFORE the query_posts(); function:

…Read More