Skip Navigation

[Résolu] Ref: Add custom option in sorting controls dropdown

This support ticket is created Il y a 7 années et 1 mois. 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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)

Marqué : ,

Ce sujet contient 1 réponse, a 2 voix.

Dernière mise à jour par Christian Cox Il y a 7 années et 1 mois.

Assisté par: Christian Cox.

Auteur
Publications
#576805

With reference to this ticket: https://toolset.com/forums/topic/add-custom-option-in-sorting-controls-dropdown/

One thing I found, when I scroll down the page, the infinite scroll will call and other results will be displayed but the added custom option will not be selected and the descending option is getting selected.
If I not selected anything from sorting by default sort by date is selected but when I scroll down to it will change to descending.
lien caché

#577131

Okay I've tweaked the code a bit to store the initial default state, then change it whenever the sorting filter is modified. Please check now and let me know if we've covered all the use cases. It looks like someone else is modifying code here, so be sure they're aware of the change if modifications are ongoing.