Different # Posts "per page" on Front Page of Archives than the rest

Hello Themeco! I am hopeful that together we can find a solution for this issue! :smiley:

The setup:
On the front page of our blog we have 5 posts showing.
On the following archive pages thereafter, there are 6 per page.

The issue:
Since the archives are set to show 6 posts per page, but only 5 show on the first page, consequently… the “6th” post (from “page 1” of the archives is missing.

The demonstration:
To see which post is missing from the 2nd “all posts” archive page

  1. Navigate to the “Uncategorized” archives pages and notice how the 5th post on the front page of our blog (entitled “Miss Us Yet?”) is the same as the 2nd post on the first page of the “Uncategorized” archive.

  2. The post after “Miss Us Yet?” on the “Uncategorized” archive page, titled “What’s Going on With the Davis-Bacon Act?”, is missing from page 2 of the “all posts” archive page.

Final Thoughts:
My thinking is that there has to be a way to tell WordPress there are 5 posts on the front page of any archive, and 6 on the rest, so that it doesn’t think it already showed the 6th post (which it has not, since page 1 of the archive only shows 5).

Thank you for your continued support, and have a great day!

Hello @SJF_me,

Thanks for writing to us.

I checked your site dashboard, it seems that you have set the post count as 5 in the layout builder(Blog archive layout) on the other page you have post count from the Settings —>Reading–>Blog pages show at most. I would suggest you set the Lopper Consumer—>Items as “ALL”, let the post count render from the Settings —>Reading–>Blog pages show at most.
Blog-Front-Page-Layouts-Pro

Please find the screenshot in the secure note.

Hope it helps
Thanks

Thank you @prakash_s, however your suggestion to set the Looper Consumer → Items as “All” does not solve the issue, because we need 5 posts to show on the first page of the archive, and 6 to show on every page thereafter.

  • Changing “Blog pages show at most” count to 5 limits EVERY page (not just the first) to show 5 posts.
    – While this does show the missing post on page 2 of the archives, it only allows 5 posts on the page.
  • Setting “Blog pages show at most” to 6 (as it currently is) then hides the 6th most recent post from page 2 of the archives, since we have it limiting to 5 posts.

The other idea I had to help with this was to adjust the offset on the second page, however as it says in the WordPress documentation… offset breaks pagination, so that’s out, too. There are ways to do custom queries which I’m currently toying with in DEV… but without any luck.

Lastly, feel free to adjust anything you want on the site using the credentials I provided. It is currently meant as a sandbox purely for support, so I welcome you to toy with whatever you need to in order to troubleshoot. You should also test the suggestion you provided! :slight_smile:

Scratch this idea… I was hoping to do some sort of “negative” offset (like -1) … to sort of pull the previous post, rather than skip the next post… but this isn’t possible.

Hello @SJF_me,

Yes, you are correct. What you have in mind is not possible as the loop will continuously return the same number of items on the first page and the succeeding archive pages. If there is anything else we can help you with, please do not hesitate to open another thread.

Regards.

Thank you for confirming @ruenel. It’s crazy to think such a simple idea is impossible to achieve! But I do appreciate your confirmation. As always, thank you – and the rest of Themeco – for your continued support! :smile:

You’re welcome, @SJF_me

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.