Title: Date Range
Last modified: August 22, 2016

---

# Date Range

 *  [geecue](https://wordpress.org/support/users/geecue/)
 * (@geecue)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/date-range-5/)
 * I’m using this plugin at work for a department. I have 3 pages that will be viewed;
   
   1. Page with posts for the current day. 2. A page with posts for “scheduled” 
   posts. 3. And a page with posts from “previous” week.
 * I have the page for “scheduled”, but if there’s a way to add a date range for
   current day, and up to days < “today’s date”?
 * [https://wordpress.org/plugins/list-category-posts/](https://wordpress.org/plugins/list-category-posts/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [geecue](https://wordpress.org/support/users/geecue/)
 * (@geecue)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/date-range-5/#post-5388520)
 * O.k. Can someone just give me the page and approximate area that I can write 
   my own query with shortcode?
 * Thanks,
    Bryan
 *  [AACT](https://wordpress.org/support/users/aact/)
 * (@aact)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/date-range-5/#post-5388569)
 * Hi,
    I guess since this was a month ago you may have solved it, but just in case
   not, I’ve just done something similar – introduced two new parameters, before
   and after (in lcp-cat-posts.php, in the default settings: ‘before’ =>”,after=
   >”,)
 * Then in include/lcp-catlist.php just before LCP makes the query (look for $query
   = new WP_Query;) I’ve added the query I want to the $args. See WordPress Codex
   WP Query for details of the various parameters. Here’s an example:
    $args[‘date_query’]
   =array( ‘relation’ => ‘OR’, array( ‘column’ => ‘post_date_gmt’, ‘after’ => $this-
   >params[‘after’], ‘before’ => $this->params[‘before’] ), array( ‘column’ => ‘
   post_modified_gmt’, ‘after’ => $this->params[‘after’], ‘before’ => $this->params[‘
   before’] ), ‘inclusive’ => true, ); Hope this helps. Will be interested to learn
   if there are other ways of doing it as hacking the plugin code is not great from
   the point of view of maintainability.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Date Range’ is closed to new replies.

 * ![](https://ps.w.org/list-category-posts/assets/icon-256x256.png?rev=2517221)
 * [List category posts](https://wordpress.org/plugins/list-category-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/list-category-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/list-category-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/list-category-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/list-category-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/list-category-posts/reviews/)

## Tags

 * [date range](https://wordpress.org/support/topic-tag/date-range/)

 * 2 replies
 * 2 participants
 * Last reply from: [AACT](https://wordpress.org/support/users/aact/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/date-range-5/#post-5388569)
 * Status: not resolved