Please open this ticket :
https://support.metabox.io/topic/show-meta-box-data-on-theme/
My code :
add_filter( 'rwmb_meta_boxes', 'Brands_and_Products' );
function Brands_and_Products( $meta_boxes )
{
$meta_boxes[] = array(
'id' => 'brand_product',
'title' => 'Brands and Products',
'post_types' => array( 'post', 'page' ),
'context' => 'normal',
'priority' => 'high',
// Conditional Logic can be applied to Meta Box
// In this example: Show this Meta Box by default. Hide it when post format is aside
'hidden' => array( 'post_format', 'aside' ),
'fields' => array(
array(
'id' => 'brand',
'name' => 'Brand',
'desc' => 'Pick Your Favourite Brand',
'type' => 'select',
'options' => array(
'Samsung' => 'Samsung',
'Nokia' => 'Nokia',
'Symphone' => 'Symphone',
'Microsoft' => 'Microsoft',
'HTC' => 'HTC',
'Sony' => 'Sony',
'Huawei' => 'Huawei'
)
),
array(
'id' => 'Samsung_products',
'name' => 'Which Apple product that you love?',
'type' => 'radio',
'options' => array(
'Samsung galaxy S' => 'Samsung galaxy S',
'Samsung pop' => 'Samsung pop',
),
'hidden' => array( 'brand', '!=', 'Samsung' )
),
array(
'id' => 'Nokia_products',
'name' => 'Which Apple product that you love?',
'type' => 'radio',
'options' => array(
'Lumia' => 'Lumia',
'N Series' => 'N Series'
),
'hidden' => array( 'brand', '!=', 'Nokia' )
),
)
);
return $meta_boxes;
}
And to show my data on front end
// Brand
echo rwmb_meta( 'brand' );
// Samsumg Products
echo rwmb_meta( 'Samsung_products' );
echo rwmb_meta( 'Nokia_products' );
// ...
Brand is showing properly. Which one I've selected about brand - OK,
I am selection nokia as a brand and Lumia as model. Here - nokia is showing, but lumais not showing properly. If I change the brand to samsung and model - Samsung Galaxy - Samsung is showing, but model - Lumia and Samsung Galaxy both are showing.
I need to show brand under on model only which I've selected.
Thanks in advance.