Skip Navigation

[Resolved] User selectable filter/select menu to change amount of results. Results filters.

This support ticket is created 5 years, 9 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 1 reply, has 2 voices.

Last updated by Beda 5 years, 9 months ago.

Assisted by: Beda.

Author
Posts
#1204802
Screen Shot 2019-02-22 at 12.25.21 PM.png

Tell us what you are trying to do?

I'd like to add a select menu, or some type of filter that allows user to change the number of posts displayed on a page. (See "View:" with "10 per page" select menu in screenshot")

I'd also like to show the user the results index as shown in the "Results 1 -10 of 36" portion of the screenshot.

I currently have something in place, and it works as expected except when you get to the last page, it displays "Results 31 - 36", which is wrong as there are only 31 results available.

Is there any documentation that you are following?

I've been following the documentation on views and pagination on your site.

Is there a similar example that we can see?
Can't think of example, but it's pretty standard behavior.

What is the link to your site?
hidden link

#1204967

Unfortunately, that is not possible in Toolset.

You can only choose in the backend how many posts per page to display, but not in the front end.

One possible solution is to link to different Views, where the Views have for example 10, 20 and 30 items per page, and the user can then click on a link somewhere in the first view that leads to the view with more (or less) results per page.

Displaying how many results of how many possible items the user sees is possible by using wpv-items-count and wpv-found-count
https://toolset.com/documentation/user-guides/views-shortcodes/#displaying-data
https://toolset.com/documentation/user-guides/views-shortcodes/#vf-155378

To have the feature you mention, to choose how many items to display in the view (per page) you could suggest it here:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

BTW I suggest removing the user you shared access to here in the forum, from your website, because it is public. I deleted it, but it was online a while until now.