Pagination for Portfolio Posts not working in custom layout?

I may well end up resolving this just as soon as I post this (there’s something about posting here and the brain being fired up! Ha!)…

I have something weird happening with pagination on portfoio posts with a custom layout. The posts show up ok, and the pagination appears to work, but navigation through the paginated pages just loads the very same posts again…

Here’s the offending page (someone please tell me what I’ve missed here, before I just code a template from scratch): https://thedreambikecompetition.co.uk/winners/

Hi @sguilliard,

Please remember that the pagination and the navigation element work only with a few pre-defined templates of Layout Builder. I would suggest you use any of the templates that come with the pagination.

Thanks for understanding.

Hi @tristup,

That’s what I have done. The only change I’ve made is to add one additional text element with dynamic content. Other than that, it’s standard template (i was just starting to play with the layout so thought I’d use a template to work it out) with the looper provider and consumers added.

UPDATE: to check that there was nothing I had added into the layout, I created another from scratch using the minimal light template. This didn’t have a looper provider, which I’ve added on the ‘posts’ row with a query builder set to pull the portfolio posts.

The pagination isn’t even showing up!

Hi @sguilliard,

To better help you with your issue, we need to check your layout settings, would you mind sharing your admin credential? To do that, please give us the following information in a Secure Note.

  • WordPress Login URL
  • Admin level username and password

You can find the Secure Note button at the bottom of your posts.

Thank you.

Secure note added

Hi @sguilliard,

The pagination with the number does not come with the pre-defined template you are using. I have created a Layout with a Pre-Defined template which has the similar structure you have used, along with the Post Pagination element and it works perfectly while assigned to the post type. If you want the number pagination, you need to use the different layout template.

Hope it helps.
Thanks

Hi @tristup,

I’ve applied the layout that you created, but it still has the same problem where, each paginated page shows the same posts as the previous or next page. Try clicking through the pages here and you’ll see what I mean: https://thedreambikecompetition.co.uk/winners/

All of these paginated pages show the same content (rather than paginating through the posts):
https://thedreambikecompetition.co.uk/winners/page/2/
https://thedreambikecompetition.co.uk/winners/page/3/
https://thedreambikecompetition.co.uk/winners/page/4/ etc.

Hi @sguilliard,

I have created another Layout and assigned it to the Post Type and again it works perfectly fine. Please find the video in the secure note.

Thanks

Hi @tristup,

I’ve taken a look through the layout that you’ve assigned and noticed that it’s the lack of the looper provider on the layouts that you created that is the difference. I had been adding a looper provider, which when removed resolves the problem. I’m able to have numbered pagination working too (once the looper provider has been removed)

Hi @sguilliard,

Please be advised that the Post Pagination element will not work when the looper provider is enabled and will only work for the blog index and the archive layouts. It is actually a WordPress Pagination feature turns into an element to make it easier to add pagination while you are using the builder. You cannot use the Post Pagination element in a single post layout or on any normal single page/post that uses Loopers.

For a single post layout, what will work is the Post Navigation which will help you to navigate between the previous and the next post item.

Hope that helps.

Thank you.

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