WordPress.org

Ready to get started?Download WordPress

Forums

Display Posts Shortcode
[resolved] Day range (12 posts)

  1. sarumbear
    Member
    Posted 1 year ago #

    Is there a way I can filter posts by a day range? I.e. can I filter posts that were published this week, month, etc. Or even better past x days and future y days?

    Thanks

    http://wordpress.org/extend/plugins/display-posts-shortcode/

  2. hayesmd
    Member
    Posted 1 year ago #

    I would like to know this too. I am looking to create a page with all the posts from the current day.

  3. HEAT22
    Member
    Posted 10 months ago #

    This is very important! Plugin useless otherwise. Please help

  4. Per the forum welcome can you please post your own topic?

    http://wordpress.org/support/plugin/display-posts-shortcode#postform

    When you do post your own topic please make sure to include as much useful information as possible.

  5. HEAT22
    Member
    Posted 10 months ago #

    why? its the same as the op. that's pointless... smh

  6. Bill Erickson
    Member
    Plugin Author

    Posted 10 months ago #

    Once WordPress 3.7 comes out, this feature can be added. The ability to query for specific date ranges was just added to WordPress trunk and is not in the current version (3.6.1).

  7. garethsb
    Member
    Posted 9 months ago #

    Hi Bill,

    +1 for being able to specify specific date ranges, e.g. all posts between two specific dates (my use case is "all posts in a particular month" to go into a monthly review post), as well as relative (most recent, future, ...) ones.

    Is this sort of thing possible now 3.7 is out?

    Thanks!

  8. Weshaw
    Member
    Posted 9 months ago #

    I'd love to do this, too. Anybody figure this out?

  9. garethsb
    Member
    Posted 9 months ago #

    I've used Shaun's WP Query Shortcode to achieve what I wanted. It actually made it very easy to do what I needed this time, but as it's extensible and I think could be upgraded quite simply to support the new WordPress 3.7 date_query options, it'll do a lot more too.

    To get the lists of posts in my October monthly review post, I've just got:
    [wpquery year="2013" monthnum="10" order="ASC"] [my-own-item-shortcode] [/wpquery]

  10. Weshaw
    Member
    Posted 9 months ago #

    Thanks @garethsb

    Did you say this is working for you as is with the Display Posts Shortcode plugin? I've just tried it, but no dice.

  11. garethsb
    Member
    Posted 9 months ago #

    No, I'm sorry. I have used just the [wpquery] shortcode to get the effect I wanted. I realise this thread is on the Display Posts Shortcode, which has many nice built-in formatting features whereas Shaun's WP Query Shortcode plugin provides the barest minimum out of the box, but I got the formatting I personally wanted easily enough with a tiny custom shortcode and some CSS. I'm a WordPress newbie but the theory of separating querying for posts and formatting the list into two plugins mentioned in the [wpquery] shortcode documentation made sense to me.

    (FWIW, the simple output I wanted using [wpquery]: see "Other posts this month" box here.)

  12. Weshaw
    Member
    Posted 9 months ago #

    Thanks, Gareth. I've already got a mess of CSS tweaking my stuff, so I may be too far in to take advantage of your fix. But I really appreciate your help.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic