Forums

Posts 2 Posts
[resolved] Add Connection info to custom column (5 posts)

  1. gillespieza
    Member
    Posted 11 months ago #

    Is there a way to add the post2post-connection information to a custom column on the Manage Posts screen? I'm currently using the "manage_edit-columns" filter and "manage_posts_custom_column" action successfully to customise my columns with "regular" meta data, but I wasn't sure if that method would be appropriate for this data?

  2. scribu
    Member
    Posted 11 months ago #

    You can use the same method for adding any column.

    Just keep in mind that connection info is stored on the connection itself, not on a particular post, so I'm not sure what exactly you would display in such a column.

  3. gillespieza
    Member
    Posted 11 months ago #

    Well, I just want to be able to see in the Manage Posts screen if a post is linked to another post. I imagined it displaying, for example, just the connected post title in a column.

    Not all my posts have connections, and the reciprocal connection is not being created, so it would be nice to have a convenient place to see whether I have to go in to a post to manually create the reciprocal connection.

  4. scribu
    Member
    Posted 11 months ago #

    Gotcha.

    Note that if you have a connection A->B, it's not necessary to create another connection B->A. Just set 'reciprocal' => true when defining the connection type.

  5. gillespieza
    Member
    Posted 11 months ago #

    Thanks w.r.t 'reciprocal' => true -- I thought I had that enabled a few versions ago, dunno how I managed to remove that bit... That helps a lot, thanks...

Reply

You must log in to post.

About this Plugin

About this Topic