admin管理员组

文章数量:1326461

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?

本文标签: How to sort custom columns for custom post type without meta query and pregetposts