Support Forum
Support › MB Settings Page › How to create left sided tabs in settingsResolved
Hi,
Is there any option to make settings tabs left styled like we do in tabs. So far I could not get any thing like that by any means 🙁
Please help me out on this.
Thank You
Hi Akram,
Left-tab-style is not supported for the settings pages yet. However, you still can use left tabs inside each meta box.
Hi Akram,
This feature is added in version 2.1.0. Please see this blog post for details.
Hi,
That's nice to see that its added but I am unable to add that. Can you please assist me out that how to add that to left sided tabs rather than default behaviour.
Thank You
Here is my code to create those tabs inside settings page
add_filter( 'mb_settings_pages', 'my_plugin_options_page' );
function my_plugin_options_page( $settings_pages ) {
$settings_pages[] = array(
'id' => 'plugin',
'option_name' => 'plugin',
'menu_title' => esc_html__('My Plugin Settings','plugin'),
'icon_url' => 'dashicons-edit',
'parent' => 'edit.php?post_type=plugin',
'style' => 'boxes',
'columns' => 2,
'tabs' => array(
'general' => esc_html__('General Settings','plugin'),
'search' => esc_html__('Search Settings', 'plugin'),
'promotion' => esc_html__('Promotion Settings', 'plugin'),
'detail' => esc_html__('Detail Page Settings', 'plugin'),
'faq' => esc_html__('FAQ & Help', 'plugin'),
),
'position' => 5,
);
return $settings_pages;
}
I even tried to add
'tab_style' => 'left'
But still I am unable to get my tabs to the left side aligned ... Kindly assist me how can I do this to make it done by now .. already way late on this here ...
Thank you
Hi,
My friend are you there ? Can I know please as I am waiting there for you guys ?
Thank You
Hi Akram,
I've tested your code and it shows the tabs on the left with 'tab_style' => 'left'
. Please see this video.