Post Pagination Always Shows 100 Pages

Hi,

I have an issue with the Post Pagination element which I cannot resolve. The screenshot hopefully shows the issue.

The screenshot shows the Archive Layout called “Casualty Search Results”. The previous page has the search filter. The issue seems to be the same whether filters are used or not.

For example, on the Casualties page (accessible through the main menu link), if I filter by “All Conflicts” and click “Search”, 307 results are displayed on pages with 50 results per page. Therefore, page 7 of the results shows the final 7 results. However, the pagination carries on to 100.

Similarly, if I use no filters and click “Search” to see all results, the pagination also shows 100, even though there should be around 350 pages in total.

I think I have the layout set up correctly - no looper provider; looper consumer on column 1 (labelled “Post” in the Outline structure in the screenshot. Post Pagination sits in column 2 and remains at 100, irrespective if column 2’s looper consumer is switched on or off.

Have I done anything wrong, or is the problem caused by something else?

Thanks,
Christopher

Hello @whitemedia,

Thanks for writing in!

Normally, the archive and search results page will only display 12 items because this is what you have set in the General Settings.

At the moment, it is displaying 50 items because the Search and Filter is set to display 50.

Be advised that the Pagination only relies on the settings. It seems that your Search and Filter plugin is causing the issue. You may need to the creators of the plugin for further assistance this is a 3rd party plugin.

Best Regards.

Hi,

This is the response from the Search & Filter Pro plugin developer - does it make any sense to you and are you able to suggest and way of resolving the issue?

It is correct, we are taking over the pagination. However, we leave the count, and thus the number of pages, to the existing code. The problem I suspect is that ThemeCo are running a separate query for the pagination, and our form is not hooking in to that. Our form IS hooking in to the query for the post loop though, hence the posts shown not matching the pagination.

Thanks,
Christopher

Hey Christopher,

Please be advised that integrating 3rd party plugin is outside the scope of our theme support. Our pagination functionality works out of the box, it would be best to ask the plugin author to check if there’s an available filter for them to make it work.

Best Regards.

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