Skip Navigation

[Resolved] Sorting by Custom Taxonomy

This support ticket is created 2 years, 1 month 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
- 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)

Author
Posts
#2307017

Tell us what you are trying to do? Sort a view by a custom taxonomy.

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? hidden link

I'm trying to add a sorting option to sort my team members by the custom taxonomy "Team Member Type" however I'm not sure how or if I can add that sorting option at all.

Thank you for your help!

#2307147

Waqar
Supporter

Languages: English (English )

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

Hi,

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

Toolset and WordPress don't support ordering/sorting the results by taxonomy.

To achieve this you'll need some workaround. For example, you can add a new custom field named 'Team Member Type' and make sure that the selected 'Team Member Type' taxonomy term name is also stored in this new custom field as a value. As a result, you'll be able to order/sort the results using this custom field.

regards,
Waqar

#2307781
Screen Shot 2022-03-03 at 11.43.52 AM.png

Hi Waqar,

Thank you for your help! I tried adding Team Member Type as a custom field for Team Members instead and did not see the options to add that sorting option to my view for "All Team Members." (See Screenshot) Is it because I have this custom field set as checkboxes? Or does that matter?

Thank you!

#2308289

Waqar
Supporter

Languages: English (English )

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

Thanks for writing back and your understanding is correct.

The data is stored in a checkboxes type custom field in serialized format, which is why it can be used for ordering or sorting of results.

If you'll change that custom field to the 'Select' type, it will work.

#2308619

My issue is resolved now. Thank you!

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