Adding or Removing URL’s in Dokan Dashboard

If you want to insert a new URL or page to your Dokan frontend dashboard, here some sample codes that does it.

Add the following codes in your theme's function.php page.

Inserting New URL's

[php]
function prefix_dokan_add_seller_nav( $urls ) {<br />     <br />    $urls['help'] = array(<br />        'title' => __( 'Help Files', 'dokan'),<br />        'icon'  => '<i class="fa fa-users"></i>',<br />        'url'   => 'http://www.help.com',<br />        'pos'    => 50<br />    );<br /> <br />    return $urls;<br />}<br /> <br />add_filter( 'dokan_get_dashboard_nav', 'prefix_dokan_add_seller_nav' );
[/php]

Removing Existing URL

Here we are removing the “Reviews” page from the left sidebar.

[php]
/**
 * Unset an item from the menu
 *
 * @param  array  $urls
 *
 * @return array
 */
function prefix_dokan_add_seller_nav( $urls ) {

    unset( $urls['reviews'] );

    return $urls;
}

add_filter( 'dokan_get_dashboard_nav', 'prefix_dokan_add_seller_nav' );
[/php]

Modifying Existing URL

Lets say you want to change the name “Products” to “Items“.

[php]
/**
 * Renames an Item title
 *
 * @param  array  $urls
 *
 * @return array
 */
function prefix_dokan_add_seller_nav( $urls ) {

    $urls['products']['title'] = 'Items';

    return $urls;
}

add_filter( 'dokan_get_dashboard_nav', 'prefix_dokan_add_seller_nav' );
[/php]

For detailed instruction, you can read this article –