Support » Plugin: Display Posts - Easy lists, grids, navigation, and more » id and posts_per_page not working

  • Resolved thesimarchitect

    (@thesimarchitect)


    Awesome plugin! No matter what I do, I can’t make the id=”” and posts_per_page=”” parameters work.

    Example of my shortcode below:

    [display-posts id=”1457, 773″ include_excerpt=”true” image_size=”large” excerpt_lenght=”40″ excerpt_more_link=”true” excerpt_more=” &#91 Continue… &#93″ include_excerpt_dash=”false” posts_per_page=”2″ wrapper=”div” wrapper_class=”display-posts-listing image-top”]

    Thanks a lot for any help!

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

    (@thesimarchitect)

    Oh, I guess that ignore_sticky_posts needs to be turned off for the other items to be hidden. It is weird that the sticky posts are not being counted towards the limit of posts per page, though.

    I hope the information is useful if anybody else has the same problem and needs a custom list only showing some posts, anyway.

    Thanks again!

    Plugin Author Bill Erickson

    (@billerickson)

    Sorry for the delay.

    Yes, sticky posts aren’t counted towards the posts_per_page. WordPress first runs your query (ex: “get 2 most recent posts”) and then it adds any sticky posts to the front of that query.

    Here’s more information: https://displayposts.com/2019/01/09/display-or-hide-sticky-posts/

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.