Home Forums Theme Support Dokan Adding tab to Dokan back office dashboard

This topic is: resolved

This topic contains 6 replies, has 4 voices, and was last updated by  Roberto 4 years, 3 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #20871

    Jason
    Member
    Post count: 102

    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

    #20935

    Nizam Uddin
    Keymaster
    Post count: 670

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

    #20968

    Jason
    Member
    Post count: 102

    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!

    #20970

    Tareq Hasan
    Keymaster
    Post count: 2831

    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.

    #30957

    Roberto
    Member
    Post count: 59

    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

    #31051

    Roberto
    Member
    Post count: 59

    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.

    #31073

    Roberto
    Member
    Post count: 59

    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 7 posts - 1 through 7 (of 7 total)

The topic ‘Adding tab to Dokan back office dashboard’ is closed to new replies.