Move Vendor Biography tab on the store page

Move Vendor Biography tab on the store page

Many Dokan users want to move or replace the Vendor Biography tab with the Products tab and keep it in the first position of the single store page.

In this article, I’m going to show the way how to do it safely through the child theme directory, and the customization will not lose by an update.

So, let’s jump into the code —–

At first, we need to create a new directory named dokan inside the child theme’s directory. Then, need to copy the store.php and store-sidebar.php file from the following directory – wp-content\plugins\dokan-lite\templates, and paste it into the newly created dokan directory.

After that, we need to replace all the content of the store.php with the vendor-biography.php file. The vendor-biography.php file is located in the following directory – wp-content\plugins\dokan-pro\templates.

Now, the default store page is displaying the Vendor Biography content on the first tab instead of the respective store’s products, but the first tab still is displaying “Products” as a title.

Let’s fix/renamed it and add a new tab on the store page. As well as remove the default Vendor Biography tab. To do that, you need to copy the following code snippet and paste it at the bottom of the child theme’s functions.php file.

Great!! We’ve successfully renamed and added a new tab. As well as remove the default Vendor Biography tab. But the new tab is still not useable/workable. The tab returns a 404 error. So, now, we need to fix it.

To do that, we need to write the Rewrite rules for it. You just copy the code and paste it again at the bottom of the child theme’s functions.php file.

After adding the code, we need to flush the permalinks. To do that, navigate to the WordPress Dashboard > Settings > Permalinks panel and click on the Save Changes button.

Yeaaa!! We can visit the newly added tab. But still need to fix it, cause it returns the default store page content now 😛.

To fix it we need to add a query variable and load the page content. As the same as above, copy the code and paste it at the bottom of the child theme’s functions.php file.

Now, we need to create a new file named store-products.php file. Then copy the store.php file content and paste it into the newly created store-products.php file.

Here, you need to copy the default store.php file content, and the file is located in the following directory – wp-content\plugins\dokan-lite\templates.

Then we need to place the file in the child theme’s dokan directory. You can put it in any place in the child theme’s directory, but to make sense it would be better to place it in the dokan directory.

Congratulation!!! We’ve successfully done the modification 🎉🎉🎉.


5 2 votes
Article Rating
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x