Skip Navigation

[Resolved] Sort order of categories

This support ticket is created 6 years, 4 months 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
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)

This topic contains 2 replies, has 2 voices.

Last updated by jillT 6 years, 4 months ago.

Assisted by: Christian Cox.

Author
Posts
#923579

I have a custom category which has a custom number field 'sort-order'.

In the cred form the categories are in a drop-down box and user selects one. Can I put the categories in order of 'sort-order' field?

I currently have...

<label>Select Photo Album:</label>
[cred_field field='photo-album' display='select' single_select='true' output='bootstrap']

#923754

Hi, there's not an easy way to do this from wp-admin. You might be able to use custom code to filter the get_terms query, or you could use a combination of a generic field with options provided by Views and custom code that captures the selection from the generic field and stores it as a term on the post. Another ticket here shows how someone customized the term order in a View's filter, but their sorting is based on hard-coded options and not a term custom field value:
https://toolset.com/forums/topic/customer-taxonomy-filter-ordering-is-breaking-other-filters/
Yours will be significantly more complex, and unfortunately I don't have a cut-and-paste solution for you. I'm glad to help if you run into a specific coding roadblock that touches any Toolset APIs.

#923868

OK, thank you anyway