Display-posts shortcode problem

  • Unknown's avatar

    On my site I have a page where I placed a list of all the entries I’ve posted, in chronological order with the most recent first:

    A Full List of Articles

    for which I’ve used the “display-posts” shortcode, as follows:

    [display-posts wrapper="div" include_excerpt="true" image_size="thumbnail" include_date="true" date_format="F j, Y" posts_per_page="1000"]

    The problem is that not all the posts are displayed, only a certain fixed number, which bears no relation so far as I can see to the parameters set in the code.

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi,

    According to:
    http://en.support.wordpress.com/display-posts-shortcode/#limits

    Limits
    The Display Posts Shortcode has a limit of 100 posts displayed.

    Hope that helps!

  • Unknown's avatar

    Thanks, that does. I didn’t realize that a limit had been implemented, if memory serves there wasn’t one earlier on, when I configured that list of posts.

    The “archive” shortcode does create a full list. Do you happen to know if there’s a way to have the excerpt of each post display after the title, much as I had set it up with the “display-posts” shortcode (modified by CSS code)?

  • Unknown's avatar

    I don’t think you can do it with the archive shortcode since these are the only customizations supported:
    http://en.support.wordpress.com/archives-shortcode/

    You can, however, use 10 instances of the display posts shortcode to display 100 posts 10 times (100 x 10 = 1000).

    Here’s one way to do it:
    You can try sorting your posts into categories
    (or tags or taxonomies, whichever you prefer).

    For example:
    Add your posts 1 – 100 to category “grouping_1”
    Add your posts 101 – 200 to category “grouping_2”
    Add your posts 201 – 300 to category “grouping_3”
    etc.
    until you get to grouping_10 and have grouped all 1000 of your posts.

    Then, do your shortcode like this:

    [display-posts category="grouping_1" posts_per_page="100"  wrapper="div" include_excerpt="true" image_size="thumbnail" include_date="true" date_format="F j, Y" ]
    
    [display-posts category="grouping_2" posts_per_page="100" wrapper="div" include_excerpt="true" image_size="thumbnail" include_date="true" date_format="F j, Y" ]
    
    [display-posts category="grouping_3" posts_per_page="100" wrapper="div" include_excerpt="true" image_size="thumbnail" include_date="true" date_format="F j, Y" ]

    etc.
    until you get to grouping_10

    Let me know if this works for you.

  • Unknown's avatar

    Right, I could add by hand a new category or tag to the first hundred posts, another to the next hundred, etc., and then proceed as you suggest. That would be rather cumbersome. But you mention also taxonomies — would there be a relatively easy procedure for grouping whole batches of posts into this or that taxonomy? (Where in the interface is the taxonomy control located?)

  • Unknown's avatar

    Hi,

    In your Dashboard, go to Posts > All Posts, then in the drop-down, you can use Bulk Edit so you can edit multiple posts at once.
    http://en.support.wordpress.com/posts/edit-posts-screen/#bulk-edit

  • Unknown's avatar

    Thank you. That would simplify the procedure.

    Apart from tags or categories, though, is there some way of defining these groups by reference to the dates of the posts?

  • Unknown's avatar

    You’re welcome!

    These are the only arguments for the display posts shortcode:

    Display Posts Shortcode

  • Unknown's avatar

    You could use the offset attribute of the shortcode instead of categories and see if that works. Something like:

    [display-posts include_excerpt="true"]
    [display-posts offset="100" include_excerpt="true"]
    [display-posts offset="200" include_excerpt="true"]

    You might have to set the offset to 101, 201, etc… I haven’t tested it out to check.

  • Unknown's avatar

    Honeysilvas — thanks for the link, I know of those parameters, but I had in mind the “archive” shortcode instead. (Why a similar range of options are not available under the latter, is a bit of a question.)

    Halluke — thank you very much, that was a simple solution which works perfectly. (No, it turns out that it’s not necessary to stagger the offsets by 1.) Probably the documentation of that command should be expanded a bit to mention this particular way of using it.

  • Unknown's avatar

    @musicuratum
    You’re welcome!

    @hallluke
    Good idea there. Thank you!

  • The topic ‘Display-posts shortcode problem’ is closed to new replies.