Support › MB Relationships › Relationships in Admin Columns: Count & Sort
This is both a Feature Request and a request for guidance on writing custom code.
I have a Authors CPT and an MB Relationships Posts-To-Authors.
I'm trying to accomplish two things in the admin columns:
#1 - Sort: When I'm viewing All Posts, I can see the Authors relationship in an admin column, but can't Sort by that column.
#2 - Count: When I'm viewing All Authors, I can see the Posts relationship in an admin column, but I need to show a Count of posts instead of the titles of posts.
I'm comfortable writing some custom code for this, but just asking if anyone has suggestions or ideas on the best way to accomplish both of these.
I also have Admin Columns Pro available if I wanted to use it. But thought I'd try a MetaBox solution first.
Anyone have suggestions?
The admin column feature for the relationship is separate and there isn't a filter/action hook to modify this column. You can take a look at the file wp-content/plugins/mb-relationships/inc/relationship/admin-columns.php