Skip Navigation

[Resolved] Pagination appears but it shouldn’t

This thread is resolved. Here is a description of the problem and solution.

Problem:

In the Classic View, the pagination still shows, when the result of the search does not have enough items to have pagination.

Solution:

Add the Pagination controls in the Loop editor and not the Output Editor.

Also, add them after ending the loop.

Pagination

Relevant Documentation:

https://toolset.com/documentation/legacy-features/views-plugin/views-pagination/

This support ticket is created 2 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 7 replies, has 2 voices.

Last updated by rubenM-3 2 years ago.

Assisted by: Christopher Amirian.

Author
Posts
#2503311

Hi,
I've a view with a custom search. If I choose an option in search, it works, but pagination appears, even if there are only a few CPT. If you reload the page (with the parameters), pagination disappears. Here: hidden link

Thank you,

#2504779

Christopher Amirian
Supporter

Languages: English (English )

Screen Shot 2022-11-27 at 11.45.05.png
Screen Shot 2022-11-27 at 11.44.02.png

Hi there,

There is a block in the block editor for pagination that you can remove.

Go to the page where you added the view and from the top left section click the hamburger menu item to show you the hierarchal view of the blocks on your page.

Find the pagination block and remove it.

That way you will not have pagination on your view.

Thanks.

#2504841
Captura de pantalla 2022-11-27 a las 11.45.41.png

Hi Cristopher,
sorry, but sometimes I believe that support people don't read the tickets. I don't want to remove pagination.
I need pagination in page, when results are 120 posts. My problem is when I use search, results are 2 posts, but pagination appears. See the screenshot. Why pagination is appearing if results are just 2 posts? Why, if you reload the page, pagination then disappears?
Please use Població filter in this page, choose Canet de Mar, and you'll see the bug.

#2505355

Christopher Amirian
Supporter

Languages: English (English )

Screen Shot 2022-11-28 at 14.31.43.png
Screen Shot 2022-11-28 at 14.28.55.png

Hi there,

I misunderstood what you meant in the initial question.

I checked my installation and that is not what I experience:

hidden link

As this is happening on your installation you need to do some troubleshooting.

Would you please double-check and see if the hierarchy of the blocks is set correctly? I shared mine in the attached screenshot so you can get an idea.

The other thing is to check a possible plugin conflict as this seems to be a Javascript error that does not remove the pagination. After you load the page there is no need to use Javascript as the result is already in the URL and the pagination will not show.

- IMPORTANT STEP! Create a backup of your website.
- Switch to the default theme such as "TwentyTwenty" by going to "WordPress Dashboard > Appearance > themes".
- Go to "WordPress Dashboard > Plugins" and deactivate all plugins except Toolset and Toolset add-ons.
- Check if you can still recreate the issue.
- If not, re-activate your plugins one by one and check the issue each time to find out the plugin that causes the problem.

According to my guess if you change the pagination from the Ajax load to the normal page load it should work. that way I will know it is the Javascript problem that I mentioned and the steps above will determine what is the cause of the issue. (check the screenshot attached)

Thank you.

#2505395
Captura de pantalla 2022-11-28 a las 13.18.21.png

Hi Cristopher,
I've tested and it doesn't work. Disable all plugins, and the result is the same. I'm thinking about my filter, which works with Ajax. Should I use Ajax pagination, maybe? I use legacy views, I attach you a screenshot. My problem is that when I filter, AJAX works, but pagination doesn't update.

Thanks!

#2505483

Christopher Amirian
Supporter

Languages: English (English )

Screen Shot 2022-11-28 at 17.11.26.png

Hi there,

I created a view with the legacy mode and the issue that you say is not happening there:

hidden link

One thing that I see, is that the pagination controls are added in the code. there are shortcodes. Make sure those shortcodes are INSIDE the wpv-itemsfound in the code and not OUTSIDE. because the Ajax code loads only inside.

Please check the screenshot.

If the problem persists, I'd appreciate it if you could give me the URL/User/Pass of your WordPress dashboard after you make sure that you have a backup of your website.
It is absolutely important that you give us a guarantee that you have a backup so if something happens you will have a point of restore.

Make sure you set the next reply as private.

#2505957

Christopher Amirian
Supporter

Languages: English (English )

Screen Shot 2022-11-29 at 11.47.21.png

Hi there,

I checked the website. You added the pagination in a wrong place (output editor)

I added the pagination in the correct place inside the Loop editor and now it works with no issues.

Please check the screenshot.

Thanks.

#2505995

Yes, it works, than you Cristopher.