Hello @loopforever ,
The solution will depend on where you are going to use this page link or how you will show this page’s address to the users.
This is not something that Dokan controls. You can use these plugins to hide/show a menu item based on user role –
https://ww.wp.xz.cn/plugins/conditional-menus/
https://de.ww.wp.xz.cn/plugins/restrict-user-access/
https://ww.wp.xz.cn/plugins/content-control/
Please make sure to use these plugins with caution. We are unable to guarantee full functionality as these were not tested officially with Dokan.
Thank you 🙂
Thank you for your answer 🙂
I want to add this page as a link to the Vendor page. So, the vendor will click on this link to switch to the relevant page.
If what I want, only the vendor should access this link. For example, if someone shares this link on another medium, they shouldn’t be able to access it. I hope you understand.
Hello @loopforever ,
Depending on how you are using the link on the vendor dashboard, you can check the user role and show/hide information. For example –
$user = wp_get_current_user();
if ( in_array( 'seller', (array) $user->roles ) ) {
//The user has the "author" role
}
See the discussion here – https://wordpress.stackexchange.com/questions/5047/how-to-check-if-a-user-is-in-a-specific-role
Please note that HTML pages are not managed by WordPress so you are unable to use conditions in an HTML page. You can hide the link based on user role but if someone has the link already then WordPress/Dokan has no option to stop someone to access that.
If the page is a WordPress page/template then you can use these conditions.
I hope this clears the confusion.
Thank you 🙂
Okay. Thank you very much 🙂