How to identify a vendor from a user using code

I’m a dev so I want to ask more.
In wordpress, the is_logged_in() hook works on the theme. This means after a user has sign in.
So I want to know the access for the vendor and customer.
It seems the vendor are the seller right and the customers are buyers.

So I want to create a custom navbar.
Like if is_logged_in user = vendor/ seller display this.

So I need the help with that.
You understand right?



The easiest option is to use the following code current_user_can(‘edit_posts’), because the vendor switches to the role to at least contributor, and this capability is present in this role, in all the roles above it.

​I hope this is helpful to you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.