Adding tab to Dokan back office dashboard

This topic contains 6 reply and 4 voices, and was last updated by Roberto 9 years, 4 months ago
Viewing 6 Posts - 1 through 6 (of 6 total)
Author Posts
May 23, 2014 at 4:04 pm 20871
Roberto Hi Support. I was wondering how I would go about adding a tab to vendor dashboard in the back office (below the settings tab). I have made an instruction page for the vendors and would like the link to be clickable from their back office. Any idea how I could do this please? Thanks
May 24, 2014 at 5:17 pm 20935
Nizam Uddin Nizam Uddin

Hello Jason
You can use dokan_get_dashboard_nav filter to do this. Thank you..

May 25, 2014 at 2:03 am 20968
Jason Jason

Thanks Nizam

Had a look at filters and it seems to be outside the realms of my coding skills.

I will try to find more information on filters and try figure this out.

I was hoping it would be as easy as adding a WP menu!

May 25, 2014 at 2:11 am 20970
Tareq Hasan Tareq Hasan

It would be similar like this, just replace the page id with yours:

[php]
function dokan_add_dashboard_menu( $menus ) {
$page_id = 19;

    $menus[‘custom’] = array(
‘title’ => __( ‘Instructions’, ‘dokan’),
‘icon’ => ‘<i class="icon-dashboard"></i>’,
‘url’ => get_permalink( $page_id )
);
     
    return $menus;
}
 
add_filter( ‘dokan_get_dashboard_nav’, ‘dokan_add_dashboard_menu’ );
[/php]

It would be ideal to create a child theme for adding this sorts of codes. So it wouldn’t be lost when a new update comes.

November 22, 2014 at 5:20 pm 30957
Roberto Roberto

This adds a page, but it won’t have the dashboard on the side.

Would it be possible to create a file in the /templates/ or “mytheme/dokan” folder like “new-slug.php” and having it work like “new-product”?
I tried but i guess something has to be done with query_vars and rewrites all over the place.
Is there any easy way to do that?

Cheers

November 24, 2014 at 2:14 pm 31051
Roberto Roberto

UP!!! (Sorry not sure you devs saw it)

Anyway my point is: I am trying to put the shortcode for WPUF in a page

function dokan_add_dashboard_menu( $menus ) {
    $page_id = 19;
     
    $menus['newsletter'] = array(
        'title' => __( 'Newsletter', 'dokan'),
        'icon' => '<i class="icon-envelope"></i>',
        'url' => get_permalink( $page_id )
    );
      
    return $menus;
}
  
add_filter( 'dokan_get_dashboard_nav', 'dokan_add_dashboard_menu' );

where the page 19 has the shortcode in it.
But obviously there is a problem, cause the page doesnt have the left dashboard.

So i was thinking of just creating a new php file in the templates theme called “new-newsletter.php”.

But I can’t figure how to do it…’cause there is something with “query_vars” and so on in order to properly show and link the page.

Would you be able to point out how to do it?
Cheers.

November 24, 2014 at 4:36 pm 31073
Roberto Roberto

Anyway my point is: I am trying to put the shortcode for WPUF in a page

function dokan_add_dashboard_menu( $menus ) {
    $page_id = 19;
     
    $menus['newsletter'] = array(
        'title' => __( 'Newsletter', 'dokan'),
        'icon' => '<i class="icon-envelope"></i>',
        'url' => get_permalink( $page_id )
    );
      
    return $menus;
}
  
add_filter( 'dokan_get_dashboard_nav', 'dokan_add_dashboard_menu' );

where the page 19 has the shortcode in it.
But obviously there is a problem, cause the page doesnt have the left dashboard.

So i was thinking of just creating a new php file in the templates theme called “new-newsletter.php”.

But I can’t figure how to do it…’cause there is something with “query_vars” and so on in order to properly show and link the page.

Would you be able to point out how to do it?
Cheers.

Viewing 6 Posts - 1 through 6 (of 6 total)