Skip Navigation

[Resolved] Secondary sorting with custom field

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)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 11 months, 2 weeks ago.

Assisted by: Waqar.

Author
Posts
#2594809
Screenshot 2023-04-17 at 12.20.37 AM.png

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

#2595905

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

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

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.