How to sort custom columns for custom post type without meta query and pre_get_posts?

Question

I have a custom post type orders and multiple custom columns. I’ve added the custom columns with the manage_orders_posts_columns hook and registered the columns as sortable with this hook: manage_edit-orders_sortable_columns.

My issue is that some of the column values are not simply meta fields; the info displayed in these columns is generated based on multiple conditions related to custom functionality.

So my question is: is there any way to make a custom column sortable other than using the pre_get_posts hook and modifying the query?

0
, Chloe 3 years 2020-08-04T16:10:33-05:00 0 Answers 58 views 0

Leave an answer

Browse
Browse