Skip to content
Documentation
< All Topics
Print

Role based user profile

If you want to show different user profile based on user’s role, it is easy. Suppose, you have three forms: form_1, form_2 and form_3, now you want to show form_2 to all users who have editor role, form_3 to all users who have subscriber role and form_1 to all other users on your site. Then, write following shortcode:

[user-meta-profile form="form_1" diff="editor=form_2, subscriber=form_3"]

Format is: diff=”Role_Name=form_Name”

For widget fill up Role_Name=form_Name format to Diff(optional) input.

 

img-01: role based user profile as widget
img-01: role based user profile as widget

 

For template tag, create an array with role as array key and form name as array value and pass the array as the third argument.

Previous User profile shortcode
Next User profile as widget
Table of Contents