Hi!
I sometimes wonder if I'm doing something wrong or if I misunderstand your way of thinking:
This code
add_action( 'mb_relationships_init', function() {
\MB_Relationships_API::register( [
'id' => 'network_in_theme',
'from' => [
'object_type' => 'post',
'post_type' => 'network',
'meta_box' => [
'title' => 'in Theme:',
],
'field' => [
'placeholder' => 'Select a Network'
]
],
'to' => [
'object_type' => 'post',
'post_type' => 'researchtheme',
'meta_box' => [
'title' => 'Networks:',
],
'field' => [
'placeholder' => 'Select a Theme'
]
],
] );
} );
creates a perfect working metabox on both the network and the theme admin page.
Network page:
- metabox title "in Theme:"
- field placeholder "Select a Theme"
Theme page:
- metabox title "Networks:"
- field placeholder "Select a Network"
To me, this seems a bit counter-intuitive if I look at the code...?