Skip Navigation

[Resolved] Disable pagination until there are results after filtering

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 3 voices.

Last updated by katjaL 1 year, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#2536139

Hello,
There are over 10.000 posts in this site and visitor is adviced to use filters. The initial view is empty and gives results only after visitor chooses some filters. Problem is this: even in initial/empty view the pagination shows and it's endless! It paginates all those 10.000 posts. So what am I doing wrong?

#2536311

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

You initially show no results (until a filter is applied) but the query still likely gets the unfiltered results, you just avoid outputting them.

The pagination controls work on the basis of what is queried (and don't know the results are not being shown).

Depending on how exactly you show no results initially, the solution would probably be to hide the pagination controls in exactly the same way (e.g. inside a conditional block).

#2536395

Thank you Nigel. This got me into right direction. I placed the pagination in classic editor within loop editor after [wpv-items-found] and before <!-- wpv-loop-start -->.

This works, thank you for your help!

#2536807

Hello,

Is this issue resolved? Please let me know if you need more assistance for it, thanks

#2536825

My issue is resolved now. Thank you!