Roots Discourse

Set posts per page on index.php

Hi guys,

So I have a site where I have set the home page to a normal template and index.php is handling the blog. I just started building on the default roots index.php which spits out blog posts and titles and limits them to 10 per page…I have done queries before where you can set posts_per_page in the args but I’m not sure how this is being set on the index.php?

The default seems to be 10 posts per page but I need 9.

Thanks

The index.php query is pre-provided by WordPress and the post limit is controlled using an option on the settings > reading screen. For more custom loops I tend to use a custom page template and run my own queries.

1 Like

Thank you for clarifying this…I was definitely over thinking this haha.

This topic was automatically closed after 42 days. New replies are no longer allowed.