Overriding Dokan plugin template is easy!
This quick-reading post will you to know about overriding a template of Dokan Multivendor plugin. Sometimes you may need to modify the core plugin file. Like as you need to remove an option from a file while it does not have any necessary action/filter. Now, you are thinking that “If I modify into the core file then I will lose everything during the plugin update”.
No need to worry! you can apply an alternate solution to modify the file via a child theme. Please keep a note –
You can only override a template file through your child theme. You can use this plugin to create child-theme.
How to override
Dokan template file?
Dokan has multiple template files to operate its functionality like as –
- Store page
- Product upload and edit page
- Store-list page and others.
To get those files just open your website’s root folder and then open wp-content → plugins →
Creating a folder inside the child theme
Just imagine that you are using a child theme called my-child-theme and you need to override a product template file which is inside
Now, inside the products folder, there are many template files like as new-product-single.php or new-product.php. Let’s pick
Step 1: Create a folder called “
Step 2: After completing step 1, just create a folder called “products” inside the
Step 3: Now, copy the new-product-single.php file inside the products folder. It will look like
If you have completed the 3rd step then you are done. Now, you can modify the
Note : The folder called “dokan” is same for both dokan-lite or pro version.