How to add extra menu on seller dashboard – Dokan Multivendor Plugin

This post is necessary if you are a Dokan user. In Dokan seller has their own dashboard panel where they can manage their own products, orders etc. Now, each marketplace place has the own business strategy and they need something very own functionality.

Now, if you want to add an extra option for the seller then you may add an extra menu on the seller dashboard. Not only the menu, you may require a template to show your own data on that location.

Here is a good example for you- Your newly registered seller need to know about your marketplace system or tutorial to run their business without any difficulties. To do that you can add an extra option on their dashboard page. 

You can create an extra menu on the seller dashboard to show all the document or tutorial for your seller. You can create a section “Document” for your seller. If they click on the document then a new template document.php will load which will contain some important document.

How can I add a new menu with a template? 

If you are not a professional developer then no need to worry. I am always here to share some simple code snippets which can help you a lot. I am sharing this custom code solution because I want to save your time and money.

First of all, you have to install a child theme on your website. Because child theme is always safe to add extra code or CSS. If you insert custom code on your parent theme then you will lose them during the theme update.

  1. Install a child theme
  2. Create a file “document.php” in your child theme directory.
  3. Open your child-theme/functions.php file

Now, on the functions.php file you can paste the below code snippets:

 

In the above code, you will see that on the line number 19 there is a required directory ” require_once dirname( FILE ). ‘/document.php’; “. This file is required because when you will click on the document menu it will load the document.php file.

Now, insert your own data on the document.php file then it will show on the document menu. You can check the screenshot below:

On the screenshot, you can see the new document menu with its own content 🙂

If you need any help regarding this post you can comment or send an email directly.

20 thoughts on “How to add extra menu on seller dashboard – Dokan Multivendor Plugin

    • Thank you now it works fine 🙂
      I just lost the dokan dashboard menu.
      Any code to call the dashboard menu ?
      Like header and footer in wordrpess ?

      Thank you 😉

        • On the document.php file you have to insert some class like as dashboard.php file of your dokan plugin. This post is showing the method for adding menu but I am unable to show the full css code. Now, on your template file which you have created for the new menu just call the action-

          < ?php /** * dokan_dashboard_content_before hook * * @hooked get_dashboard_side_navigation * * @since 2.4 */ do_action( 'dokan_dashboard_content_before' ); ?>
  • @Jeremy I am not clear which menu are you pointing now. You can ask me only about my post. If you need to improve it then you can do 🙂 I am unable to provide support for your query via this post 🙂

  • @Megan, After adding the menu if you have added your new template like “document.php” then you have to insert those correct

    on the document.php which you can find on the dashboard.php file of dokan plugin. You have to adjust them. I have tried to show the basic process 🙂
  • @Nayem It could be much more easier to understand if you could just add one line comment above each filter for what it does.

    • on your template file which you have created for the new menu just call the action-

      < ?php /** * dokan_dashboard_content_before hook * * @hooked get_dashboard_side_navigation * * @since 2.4 */ do_action( 'dokan_dashboard_content_before' ); ?>
  • Has anyone gotten this to work?? I get the menu item showing up but when use the php snippet in my template file it does not look like the example above – just shows my text under the menu and the menu is dark instead of light.

    • @brian, The above example was tested and provided to get idea about the process to add a new menu. After adding the above code you should get a new menu without any problem with template. Just you have to call the do_action( ‘dokan_dashboard_content_before’ ); to get the dashboard sidebar on your template.

    • @rajesh, document.php is a sample file you have to link it with your own template file but yes the file need to be placed on your child theme/dokan folder 🙂

  • I was able to make some progress on this and have the page appear in the right place – but after my content the page ends abruptly. I would think that the footer should come next but the page simply ends and most functionality doesn’t work since the page isn’t loading properly. i used the reviews and reports tabs as examples and used very similar code which is why i’m not sure why my page is ending whereas the other tabs do not. thoughts?

Leave a Reply

%d bloggers like this: