If you are a Dokan plugin user, this may turn out to be an important post for you! Today, we will try to show you something interesting yet helpful for your multivendor marketplace.
As a marketplace owner, you may receive tons of technical questions from your vendors. We think you are using a simple contact form or replying their query directly via e-mail which is really a time taking process.
You might be thinking about creating a help section for each vendor on their frontend vendor dashboard or any custom content which is necessary for them. For instance, your new vendors may need some help to know about your marketplace and you do not want them to waste time by sending an e-mail or making a phone call to you.
weDevs always care about you and that's why we thought to create a sample to show how easily you can create a dashboard menu. This post will help you a little bit to make your marketplace more functional and professional.
How Can You Add An Extra Menu
It's natural that you do not want to do the same thing over and over again. So, let us try to show you a good way to customize Dokan plugin which would not affect during the plugin update. Do you want to know the full process? Then Dive in with us.
Add & Edit Your Child Theme
Okay, we are going to add the extra menu through using your child theme. If you do not have a child theme then please install a child-theme on your website. A child theme is always safe to override template or function. So, please follow below steps –
- Install a child theme and activate it.
- Create a file called help.php and insert the file into your child-theme folder.
Now, open the functions.php file of your child-theme and then insert below code on the file –
If you are copying the file directly on your existing child theme's functions.php then please do not copy
?php because your functions.php already have this tag started. After adding the code, now check your vendor dashboard page and you will get the new menu called “Help“.
Now, on the above screenshot, the help menu is showing already 🙂 You might be feeling sad because when you are clicking on the Help menu it is a showing blank page. Please hold on! we are not finished yet!
Adding Content to Your New Menu
If you have read the entire post correctly then you have already created a page called help.php into your child theme folder. Now, edit the help.php file through a text editor or with a code editor like Submile text.
On the help.php file, you can use the below code to show some content on the help page –
After adding the above codes, you might get the content of Help page like below screenshot :
Before clicking on the help menu, you have to set the permalink settings. You can follow this doc to flush permalink structure.
Now, click on the help menu and you will see the dummy content like above. So, you are done with the new menu 😀
All of the above contents are simply dummy text. You may need to add your own contents on help.php file to make it a perfect fit for your requirements!
If you liked our post, please feel free to leave a comment below. We would love to reply to your queries.