Forum Replies Created
-
AuthorPosts
-
mzykin
Participant+1. Would love this capability, especially since it's pretty confusing for some of my not-so-tech-savvy clients who get very confused when they try to add a new tag in a frontend submission form.
mzykin
ParticipantGreat, that works, thanks!
mzykin
ParticipantHi Anh, thanks so much for the response. I ended up hooking into the
save_postaction to add user meta for each relationship created. On the user's end, I hooked intoprofile_personal_options(if editing own profile) andpersonal_options(if editing someone else's profile) to add the user meta.mzykin
ParticipantHey Anh,
Sure thing, here's my code:
add_action( 'mb_relationships_init', function() { MB_Relationships_API::register( array( 'id' => 'groups_to_group_sessions', 'from' => array( 'object_type' => 'post', 'post_type' => 'group', 'meta_box' => array( 'title' => 'Group Sessions' ), 'admin_column' => array( 'position' => 'before date', 'title' => 'Group Sessions' ) ), 'to' => array( 'object_type' => 'post', 'post_type' => 'group-session', 'meta_box' => array( 'title' => 'Groups' ), 'admin_column' => array( 'position' => 'after title', 'title' => 'Groups' ) ) ) ); MB_Relationships_API::register( array( 'id' => 'user_to_group', 'from' => array( 'object_type' => 'user', 'admin_column' => array( 'title' => 'Groups' ) ), 'to' => array( 'post_type' => 'group' ) ) ); } );The relationships are being created in the database and the admin columns themselves are appearing, but columns are blank and don't show the connected posts.
mzykin
ParticipantHi Anh,
Thanks for the response! I took a look at the link and it looks like there's been some changes since that commit.
I downloaded the latest stable release (1.6.0) and am still running into the issue. It looks like file referenced above (inc/class-mb-relationships-relationship.php) no longer exists, and has been modified into inc/relationship/admin-columns.php, which is where I think the issue is coming from.
mzykin
ParticipantHey guys,
Just curious what the fix was? I'm running into the same exact issue.
Running MB version 4.18.2 and MB Relationships 1.6.0.
Cheers,
Mary-Ann -
AuthorPosts