Skip Navigation

[Gelöst] Adding a „sort by alpha“ option to random results in custom post type view

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem: I would like to display a View initially sorted in random order. I would like to provide a checkbox on the filters so Users can sort the results alphabetically by title.

Solution: Nothing exactly like that exists in Toolset, but there are other options available for front-end sorting.

Relevant Documentation:
https://toolset.com/documentation/user-guides/allowing-visitors-to-sort-the-front-end-results/

This support ticket is created vor 5 Jahren, 3 Monaten. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Tom Gonzales vor 5 Jahren, 3 Monaten.

Assistiert von: Christian Cox.

Author
Artikel
#1310655

Tell us what you are trying to do?
I would like to add the option (using a checkbox) for the user to sort the view results, which load in random order by default, to sort by title ascending after the initial view results have loaded.
Is there any documentation that you are following?
No
Is there a similar example that we can see?
No
What is the link to your site?
versteckter Link

#1310691
Screen Shot 2019-08-06 at 3.20.56 PM.png

Hi Toolset doesn't have this exact type of control available, but does allow for front-end sorting of a View's results by the User by other means. The checkbox isn't available, but you can show a dropdown list of sort options and allow Users to adjust the sort direction if you'd like. To insert those controls, edit the View and find the Search and Pagination editor panel. If you cannot find the panel, scroll to the top right corner and click "Screen Options". You can enable the Search and Pagination editor panel here. Click "Sorting Options" to see a popup that allows you to edit the front-end sorting options. I'm attaching a screenshot here showing options for random order and order by title. A preview is included on the right side.

Another option is to create a sortable table View. More detailed information about these features is available in the documentation here: https://toolset.com/documentation/user-guides/allowing-visitors-to-sort-the-front-end-results/

Let me know if that's not clear, and I can help.

#1310707

My issue is resolved now. Thank you!