• Resolved jay126

    (@jay126)


    Hi, I’d like to know how to switch the position of bottom tabs (eg visit store) in the seller’s dashboard.

    However , i not able to locate correct urls name in order to unset and switch to other postion .here attach my code however it’s doesnt work


    add_filter( ‘dokan_get_dashboard_nav’, ‘prefix_dokan_remove_seller_nav’ );
    function prefix_dokan_remove_seller_nav( $urls ) {

    unset( $urls[‘Visit Store’] );

    return $urls;
    }

    
    li class="dokan-common-links dokan-clearfix">
    =<a title="" href="https://dudukpedia.co/store/colfaxstore/" target="_blank" rel="noopener">Visit Store</strong>"><i class="fa fa-external-link"></i></a>
    
    • This topic was modified 3 years, 4 months ago by jay126.
    • This topic was modified 3 years, 4 months ago by jay126.
    • This topic was modified 3 years, 4 months ago by jay126.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Jahidul Hassan Mojumder

    (@jahidulhassan)

    Hi @jay126

    If you want to change the common links of the vendor dashboard then you will need to use the below-mentioned hook instead of the one you’re using right now.
    dokan_dashboard_nav_common_link
    Use the above-mentioned hook and reorder the $common_links as the same format as declared on wp-content\plugins\dokan-lite\includes\template-tags.php this file’s line number 563.

    I hope this will help you reorder the common links.

    Thread Starter jay126

    (@jay126)

    hi @jahidulhassan

    after change to code below, website experience “There Has Been a Critical Error on Your Website” ..

    add_filter( ‘dokan_dashboard_nav_common_link’, ‘prefix_dokan_remove_seller_commonlinks’);

    function prefix_dokan_remove_seller_commonlinks ( $common_links ) {

    unset( $common_links[‘Visit Store’] );

    return $common_links;
    }

    Plugin Support Jahidul Hassan Mojumder

    (@jahidulhassan)

    Hi @jay126

    The $common_links is not an array rather it is a string which is consisting of HTML syntax. Kindly have a look at wp-content\plugins\dokan-lite\includes\template-tags.php this file’s line number 563 and I hope you will get what to do exactly. You will just need to rewrite the string for $common_links and you will be good to go. As $common_links is not an array, there is no such thing as $common_links['Visit Store'].

    Thread Starter jay126

    (@jay126)

    @jahidulhassan ,

    thanks .worked with below code.

    
    add_filter( 'dokan_dashboard_nav_common_link', 'dokan_custom_dashboard_nav_common_link' );
    
    function dokan_custom_dashboard_nav_common_link( $links ) {
    	
        $links = '<li class="dokan-common-links dokan-clearfix">
            <a title="' . __( 'Edit Account', 'dokan-lite' ) . '" href="' . dokan_get_navigation_url( 'edit-account' ) . '"><i class="fa fa-user"></i></a>
            <a title="' . __( 'Log out', 'dokan-lite' ) . '" href="' . wp_logout_url( home_url() ) . '"><i class="fa fa-power-off"></i></a>
        </li>';
    
        return $links;
    }
    
    • This reply was modified 3 years, 4 months ago by Yui.
    • This reply was modified 3 years, 4 months ago by Yui. Reason: formatting
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Change order of tabs in Seller Dashboard’ is closed to new replies.