Skip Navigation

[Resolved] Search results

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

Problem:

The issue here is that the user wanted pagination numbers with the format
1-12 of 2,000 results found
Click Next
13-25 of 2,000 results found
Click Next
26-37 of 2,000 results found
and so on.

Solution:

It wont be possible to have your pages labeled as 1-12 of 2,000 results found.

You can have it as 12 of 2,000 results found and this is because of the limitations of the shortcodes that will be employed to display this information.

They can only display the current results count and the total number of results. The only way i see this being possible is for you to make use of a custom shortcode to minus 12 from the current page results count.

This will involve that you pass the following shortcode into your custom shortcode and using your custom shortcode to display the final results.
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#displaying-data

This support ticket is created 3 years, 3 months 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.

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

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by rajivG 3 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#2146361

Hi,

I have a query, please.

When I click on the pagination (either Prev or Next), I need the search results to change incrementally. For example:

12 of 2,000 results found
Click Next
24 of 2,000 results found
Click Next
36 of 2,000 results found
and so on.

May I know how this can be set up?

Thanks,

Rajiv

#2146423

A correction:

1-12 of 2,000 results found
Click Next
13-25 of 2,000 results found
Click Next
26-37 of 2,000 results found
and so on.

#2146755

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Rajiv,

Thank you for getting in touch.

Based on your new requirements below.
1-12 of 2,000 results found
Click Next
13-25 of 2,000 results found
Click Next
26-37 of 2,000 results found
and so on.

It wont be possible to have your pages labeled as 1-12 of 2,000 results found.

You can have it as 12 of 2,000 results found and this is because of the limitations of the shortcodes that will be employed to display this information.

They can only display the current results count and the total number of results. The only way i see this being possible is for you to make use of a custom shortcode to minus 12 from the current page results count.

This will involve that you pass the following shortcode into your custom shortcode and using your custom shortcode to display the final results.
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#displaying-data

Please let me know if this was able to put you on the right track.

Thanks,
Shane

#2147435

Thank you for your reply.

I get that if I have 1-2-3-4-5 in the pagination, it will show something like 12 of 2000 results when I click on 1 or 2 or 3 or 4 or 5.

Can this display be changed in any other way? Thank you.

#2148871

My issue is resolved. Thank you.