Relationships in Admin Columns: Count & Sort

Support MB Relationships Relationships in Admin Columns: Count & Sort

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43429
    brandonjpbrandonjp
    Participant

    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?

    #43443
    PeterPeter
    Moderator

    Hello Brandon,

    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

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.