Limit the number of posts shown

When displaying a list of posts, Display Posts uses the number you have set in Settings > Reading > “Blog pages show at most” by default.

But you can change this using the posts_per_page parameter in a shortcode. For instance, if you only wanted to list two posts, use:

[display-posts posts_per_page="2"]

If you want to list every post, you can use a really high number:

[display-posts posts_per_page="-1"]

Published by Bill Erickson

Bill Erickson is a freelance WordPress developer and a contributor to the Genesis framework. For the past 14 years he has worked with attorneys, publishers, corporations, and non-profits, building custom websites tailored to their needs and goals.