Sauter la navigation

[Résolu] Secondary sorting with custom field

This support ticket is created Il y a 2 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.

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/Karachi (GMT+05:00)

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

Dernière mise à jour par Waqar Il y a 2 années et 1 mois.

Assisté par: Waqar.

Auteur
Publications
#2594809
Screenshot 2023-04-17 at 12.20.37 AM.png

Is it possible to sort a custom field as secondary sorting?

#2595905

Hi,

Thank you for contacting us and I'd be happy to assist.

Your observation is correct and the custom fields are not available for the secondary ordering.

To achieve this, you'll need a custom function attached to the 'wpv_filter_query' hook. You'll find an example of such a function in this forum thread:
https://toolset.com/forums/topic/sort-by-2-custom-fields/

I hope this helps and please let me know if you need further assistance.

regards,
Waqar