Skip Navigation

[Resolved] Sorting custom fields associated with a taxonomy in the dashboard

This support ticket is created 3 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.

Our next available supporter will start replying to tickets in about 2.10 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by Saul Baizman 3 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#2201941
Screen Shot 2021-10-21 at 13.04.13.png

Hi there,

I've created a custom taxonomy ("Curatorial Categories") and associated a couple of custom fields with it (including a field into which someone can enter a number, which we'll call "Order"). Please refer to the attached screenshot.

In the WP dashboard, when looking at the list of taxonomy terms, I'd like to be able to click on "Order" in the column header to sort the terms by the Order field, in the same way that I can click on the "Name" and "Slug" column names.

I know I have to add some PHP code to do this. Can you point me to the correct WordPress hook? And might you have some starter code?

Thank you!

Saul

#2202317

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Yes - there is no such feature offered by Toolset and you will require to add custom code.
=> https://stackoverflow.com/questions/38268851/sort-taxonomy-terms-table-in-the-admin-by-custom-sort-field

You should also try to search for the plugin that offer such feature like admin columns or any other.

#2202817

This information is very helpful. Thanks, Minesh!