Title: Query String / Month
Last modified: August 21, 2016

---

# Query String / Month

 *  [Theunknown1](https://wordpress.org/support/users/deexgnome/)
 * (@deexgnome)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/query-string-month/)
 * Hey,
 * i have a question to the query string. For the moment i use for posts
    `$my_query
   = new WP_Query('orderby=comment_count&showposts=3');`
 * I have read [http://codex.wordpress.org/Function_Reference/query_posts](http://codex.wordpress.org/Function_Reference/query_posts)
 * but i’m not sure how to do it. What i would like to add is the command for yust
   display it for the comments of the current week.
 * I hope someone have a idea

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/query-string-month/#post-5097336)
 * Have a look at [http://codex.wordpress.org/Function_Reference/WP_Query](http://codex.wordpress.org/Function_Reference/WP_Query)
 *  [xennex81](https://wordpress.org/support/users/xennex81/)
 * (@xennex81)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/query-string-month/#post-5097437)
 * This array parameter seems to do what you want:
 * `$args = array('date_query' => array ( 'after' => '1 week ago' ) );`
 * provided you want the last 7 days, and not the current week number.
 * perhaps:
 * `$args = array('date_query' => array( 'after' => '1 week ago', 'inclusive' =>
   true ));`
 *  Thread Starter [Theunknown1](https://wordpress.org/support/users/deexgnome/)
 * (@deexgnome)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/query-string-month/#post-5097471)
 * Thank you Xennex81 🙂 i will try it out

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

The topic ‘Query String / Month’ is closed to new replies.

## Tags

 * [month](https://wordpress.org/support/topic-tag/month/)
 * [query](https://wordpress.org/support/topic-tag/query/)
 * [string](https://wordpress.org/support/topic-tag/string/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 3 replies
 * 3 participants
 * Last reply from: [Theunknown1](https://wordpress.org/support/users/deexgnome/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/query-string-month/#post-5097471)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
