- This topic has 5 replies, 3 voices, and was last updated 1 year ago by .
When register this relationship shouldn’t setting
'post_type' => 'product'in the
'to'make it so that meta box only appear for the product cpt?
For some reason the ‘Saves’ meta box also appears on the normal post edit screen as well.
MB_Relationships_API::register([ 'id' => 'users_to_products', 'from' => [ 'object_type' => 'user', 'meta_box' => [ 'title' => 'Saves', 'field_title' => 'Select Products', ], ], 'to' => [ 'object_type' => 'post', 'post_type' => 'product', 'meta_box' => [ 'title' => 'Saved By', 'context' => 'side', 'empty_message' => 'No users', ], ], ]);
- You must be logged in to reply to this topic.