Title: Range Last 31 days, last 6months, all time?
Last modified: March 21, 2021

---

# Range Last 31 days, last 6months, all time?

 *  Resolved [ConiMoss](https://wordpress.org/support/users/conimoss/)
 * (@conimoss)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/range-6months-all-time/)
 * So I have been playing with the plugin for the last few days, but somehow I couldn’t
   get the range to show older than ‘last24hours’.
 * I have tried:
    ‘range’ => ‘last2days’, ‘range’ => ‘last60days’, ‘range’ => ‘last2months’,‘
   range’ => ‘last6months’, ‘range’ => ‘last1year’,
 * nothing hapeens.
 * Is there any possible list of ranges available for most commented posts?
 * I’m currently using this code:
 * <?php
    $args = array(
 *  ‘limit’ => 6,
    ‘range’ => ‘last24hours’, ‘order_by’ => ‘comments’, ‘stats_views’
   => 0 );
 * wpp_get_mostpopular($args);
    ?>
    -  This topic was modified 5 years, 1 month ago by [ConiMoss](https://wordpress.org/support/users/conimoss/).
    -  This topic was modified 5 years, 1 month ago by [ConiMoss](https://wordpress.org/support/users/conimoss/).

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

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/range-6months-all-time/#post-14213196)
 * Hi [@conimoss](https://wordpress.org/support/users/conimoss/),
 * The `range` parameter only accepts the following values (as described in **Settings
   > WordPress Popular Posts > Parameters**):
    - last24hours
    - last7days
    - last30days
    - all
    - custom
 * If you want to use a custom time range you’ll need to set `range` as _custom_
   and use `time_quantity` and `time_unit` to set your custom time interval.
 * For example:
 *     ```
       <?php
       $args = array(
           'range' => 'custom',
           'time_quantity' => 1,
           'time_unit' => 'hour'
       );
   
       wpp_get_mostpopular($args);
       ?>
       ```
   
 *  Thread Starter [ConiMoss](https://wordpress.org/support/users/conimoss/)
 * (@conimoss)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/range-6months-all-time/#post-14213205)
 * thanks a lot.
 * It worked exactly as I wanted.
    -  This reply was modified 5 years, 1 month ago by [ConiMoss](https://wordpress.org/support/users/conimoss/).
    -  This reply was modified 5 years, 1 month ago by [ConiMoss](https://wordpress.org/support/users/conimoss/).
    -  This reply was modified 5 years, 1 month ago by [ConiMoss](https://wordpress.org/support/users/conimoss/).

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

The topic ‘Range Last 31 days, last 6months, all time?’ is closed to new replies.

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

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [ConiMoss](https://wordpress.org/support/users/conimoss/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/range-6months-all-time/#post-14213205)
 * Status: resolved