Support Forum
Support › Meta Box Tabs › Customizer and TabsResolved
Hi all,
I have my site settings page created and organized using the MB tab plugin. It looks great in the WP dashboard page. I also have it set too work in the customizer. It appears in the customizer, but it shows a tabbed design instead of individual panels.
Could you help me understand how to make it appear as individual panels in customizer, but keep the tabbed design in the Dashboard?
This is the customizer image
https://www.dropbox.com/s/zgdupieggxk4ola/Screen%20Shot%202020-12-14%20at%201.45.09%20PM.png?dl=0
Here is the site settings dashboard page
https://www.dropbox.com/s/1k8uj9whrotm7pw/Screen%20Shot%202020-12-14%20at%201.45.47%20PM.png?dl=0
I'd like it to appear like this:
https://www.dropbox.com/s/qotqmthhf7k4sdf/Screen%20Shot%202020-12-14%20at%201.47.46%20PM.png?dl=0
Here is the opening part of my code:
// Site Info Settings
add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) {
// Church Information Section
$meta_boxes[] = array(
'id' => 'church-info',
'title' => 'Church Information',
'settings_pages' => 'site-info',
'fields' => array(
array (
'id' => 'single_image_church',
'type' => 'single_image',
'name' => esc_html__( 'Church Image', 'text-domain' ),
'tab' => 'ta_set1',
),
array(
'name' => 'Church Name',
'id' => 'text',
'type' => 'text',
'placeholder' => 'Church Name',
'size' => 30,
'tab' => 'ta_set1',
),
Thanks,
Eric
Hi Eric,
When using Tabs with Settings Page, you should define the tab
in the meta boxes setting. Please follow this sample code https://github.com/wpmetabox/library/blob/master/extensions/mb-settings-page/conditional-tabs.php.
Let me know how it goes.
Hi,
Yes, that helped. It took a little time to sort out, but I was able to reformat the tabs so they both look good in the customizer and the dashboard.
thanks,
eric