- This topic has 2 replies, 2 voices, and was last updated 2 years, 1 month ago by .
-
Topic
-
I want to connect a specific user role (Contacts) to a CPT (Deals). your documentation says to do this
add_action( 'mb_relationships_init', function () { MB_Relationships_API::register( array( 'id' => 'users_to_posts', 'from' => array( 'object_type' => 'user', 'meta_box' => array( 'title' => 'Assigned To', 'field_title' => 'Select Deals', ), ), 'to' => array( 'object_type' => 'post', 'post_type' => 'post', 'meta_box' => array( 'title' => 'Managed By', 'context' => 'side', 'empty_message' => 'No users', ), ), ) ); } );
2 questions:
- the object_type is set to user, but can I specify a user role instead of all users?
- if I want to connect CONTACTS with DEALS, then do I just change post_type=”posts” to post_type=”deals” on the TO side?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.