Custom Fields
Re-Envisioned
Support MB Settings Page How to create left sided tabs in settings

  • Creator
    Topic
  • #17220
    Resolved Akram ul haq
    Participant

    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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #17234
    Anh Tran
    Keymaster

    Hi Akram,

    Left-tab-style is not supported for the settings pages yet. However, you still can use left tabs inside each meta box.

    #17625
    Anh Tran
    Keymaster

    Hi Akram,

    This feature is added in version 2.1.0. Please see this blog post for details.

    #17915
    Akram ul haq
    Participant

    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

    #17916
    Akram ul haq
    Participant

    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

    #17933
    Akram ul haq
    Participant

    Hi,

    My friend are you there ? Can I know please as I am waiting there for you guys ?

    Thank You

    #17941
    Anh Tran
    Keymaster

    Hi Akram,

    I’ve tested your code and it shows the tabs on the left with 'tab_style' => 'left'. Please see this video.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
grid gear info copy caret-up caret-down trash