Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
Hello, is it possible to get the user role in the user profile? What i mean is that i want to show different things for an administrator and different things for a subscriber.
You can do conditional php coding based on user role. Do you understand the basic concept? Example, run a php condition if user’s role is admin -> show something, etc.
Aside from this, you can use the feature: http://userproplugin.com/userpro/wp-admin/admin.php?page=userpro&tab=fieldroles
Role-based fields
Yes I get it. But I can’t access the link you sent me (You do not have sufficient permissions to access this page.). I think it’s only for admin.
So I created a page in my template’s folder. What you suggest is to check the user’s role(not the current logged in user but the one in their profile) and if he is for example an “administrator” to show something. If not an “administrator” don’t show this.
The issue i’m having is that I can’t get the user’s role. For example that profile (http://www.domain.com/profile/Pit). How can I check if “Pit” is an “administrator”?
Thanks a lot for your quick reply!
You must be logged in to reply to this topic.