• Resolved Fabricio10

    (@fabriciobarros10)


    I need to move the “store” and “shipping” tabs in the settings menu and leave them in the home menu to be together with the others. I will hide the settings menu to make the session simpler.

    the hide part i know how to do it but the furniture part i don’t know how to do it

Viewing 5 replies - 1 through 5 (of 5 total)
  • panda

    (@alejorostata)

    I wanted to do the same, not sure with the paid version but in lite-version, there are only two menus in ‘Settings’ which is the Store & Payment. No need to group them in Settings, it will be better to move them to Home menu.

    Hello @fabriciobarros10 ,

    I can show you one workaround which will give the kind of same output –

    First we will remove the original menu for store and payment settings –

    add_filter( 'dokan_get_dashboard_settings_nav', function($settings_sub) {
        unset($settings_sub['store']);
        unset($settings_sub['payment']);
    
        return $settings_sub;
    } );

    Then we will add them on the main dashboard menu list –

    add_filter('dokan_get_dashboard_nav', function($urls){
    
        $urls['store'] = array(
            'title'      => __( 'Store', 'dokan-lite'),
                'icon'       => '<i class="fa fa-university"></i>',
                'url'        => dokan_get_navigation_url( 'settings/store' ),
                'pos'        => 5,
                'permission' => 'dokan_view_store_settings_menu'
        );
        $urls['payment'] = array(
            'title'      => __( 'Payment', 'dokan-lite'),
                'icon'       => '<i class="fa fa-credit-card"></i>',
                'url'        => dokan_get_navigation_url( 'settings/payment' ),
                'pos'        => 6,
                'permission' => 'dokan_view_store_payment_menu'
            );
        return $urls;
    });

    You can hide the settings tab with CSS –

    .dokan-dashboard-menu li.settings {
        display: none;
    }

    I hope this helps.

    Thank you.

    Thread Starter Fabricio10

    (@fabriciobarros10)

    ?? ?? ?? thanks, it worked

    panda

    (@alejorostata)

    It worked for me too, but I completely remove the settings via unset instead of hiding it using CSS.

    
    function prefix_dokan_remove_settings( $urls ) {
        unset( $urls['settings'] );
        return $urls;
    }
    add_filter( 'dokan_get_dashboard_nav', 'prefix_dokan_remove_settings' );

    Also, clicking the menu won’t generate a class of active which means users won’t be able to identify or will be confused as to which menu is active.

    • This reply was modified 4 years, 4 months ago by panda.
    panda

    (@alejorostata)

    This topic may help you if you have an issue on the active menu where the highlight is no longer works.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Menu’ is closed to new replies.