The shortcode reference includes all shortcodes available for UserPro, plus all options you can use within the shortcodes and what they do exactly. Use this guide to create the shortcode you want and customize it to your needs.
This is documentation for general shortcode options. For detailed options for each shortcode, you can skip that part.
The template tells UserPro which template to show. E.g. template=login, template=view, template=register etc.
This sets the plugin width. By default this is set to 480px. (Or whatever option you set for width in backend) To make the plugin shortcode expand to 100%, use max_width=100% % or px values are accepted. This option can be set globally in plugin settings.
This option controls the thumbnail size of profile picture in view/edit mode. Enter numeric size. By default this is set to 100. e.g. profile_thumb_size=80 will show 80 pixels profile picture.
If you set this option to true, the shortcode header will not be displayed allowing you to put your custom header.
If you set this option to true, the shortcode will appear in a plain style to match your own design/background.
This controls the layout of fields. The value can be ‘float’ or ‘none’, by default this value is ‘float’ It means the label will try to float to left of field. If you set this to none, the label will be on a seperate line in your form.
Set the top margin of your shortcode. By default, the top margin is 0.
Set the bottom margin of your shortcode. By default, the bottom margin is 30px.
This option controls the alignment of your shortcode. By default align is set to ‘center’. Possible values are center, left, right, or none.
Skin name to use for this shortcode. By default, skin is set in plugin settings. Default skin is ‘default’.
This can be 1 or 0. If this is turned on, only one collapsible section will be open at one time. To disable this, please set this option to 0.
This option can turn on/off field groups/sections even If you have sections enabled on your form. If you set this to 0, sections will be disabled and fields will appear without sections. Default value is 1.
Responsible for showing profiles on the frontend.
To show the profile of post author, use user=author, and If you want to show or promote the profile of specific user, set user=Username in your shortcode. By default the shortcode displays the current profile, or viewed profile via URL.
Set header_only=true to show the profile header only (compact view) without the full profile details. Perfect if you want to show profile heading only including social icons and not the complete profile.
A comma seperated list of custom fields (or field keys) you want to show in the profile view only. This will exclude any other fields than the one you specify in that option.
The same as above option but uses field name instead of field key (e.g. include_fields_by_name=”First Name,Last Name”) will show only first and last name on the profile.
This include fields based on the allowed field types you set here. A comma seperated list of field types will work. Example: include_fields_by_type=select,radio will show only these fields that are select dropdown or radio group. include_fields_by_type=picture,file will include only photo upload fields and files.
A comma seperated list of custom fields (or field keys) you want to exclude from profile view.This will include any other fields than the one you specify in that option.
The same as above option but uses field name instead of field key (e.g. exclude_fields_by_name=”Age,Region,etc.”) will exclude these fields from appearing on profile.
This exclude fields based on field types you set here. A comma seperated list of field types will work. Example: exclude_fields_by_type=textarea will hide any fields that are textarea fields. exclude_fields_by_type=picture,file will exclude photo upload fields and files.
This shortcode displays the member directory. The shortcode has many options that you can customize.
This can be 1 or 0. Enable/disable the new member directory (v2) It is enabled by default, but you can turn it off by setting this to 0.
This controls the size of user picture in memberlist v2, default is 86 (pixels)
A comma seperated list of fields that will be displayed below user name in member directory. By default this option is set to memberlist_v2_fields=age,gender,country by default. To customize this option pass a comma seperated list of fields to display here. Example: memberlist_v2_fields=city,age,country
Show/hide the user description in member directory v2, by default this is set to 1. To turn it off set it to 0.
This option can be 1 or 0, it shows/hides the user badges from member directory v2.
This option can be 1 or 0, it shows/hides the user display name from member directory v2.
This controls the user image size in the standard member directory, by default the image is 120 (pixels)
This is the top margin of each result in member directory in pixels. Enter 0 to remove all margin on top. Default is 15 pixels.
This is the side margin of each result in member directory in pixels. Enter 0 to remove all margin on sides. Default is 30 pixels.
This can be 1 or 0. Enable/disable rounded user images in member directory.
This controls the maximum width of member directory relative to its parent. For example, if you want it to take only 50% of the parent, enter 50% in this option. By default it is set to 100% of its parent.
Turn on/off pagination on member directory. By default this is set to 1 (Enabled)
Turn on/off top side pagination on member directory. By default this is set to 1 (Enabled)
Turn on/off bottom side pagination on member directory. By default this is set to 1 (Enabled)
Show or hide the user name in member directory. This can be 1 or 0.
If set to 1, profiles will open in a popup instead of opening in new link. By default this is disabled (set to 0)
Show only members who have custom avatar. This is turned off by default, to enable set it to 1.
When turned on (set to 1) it will list only these members that have been verified by admin and have the Verified badge beside their name. By default this is turned off.
A comma seperated list of custom fields that you want to allow for searching thru the main search input. Left blank by default. (Since you can now add custom search filters seperately! Please look at the tutorial in the forum.)
How many members do you want to show per page. Default is 12
This controls the way members are sorted. By default this is set to ‘registered’ ordering members by registration date.
This can be desc or asc. It means order results in Ascending vs Descending mode.
This can be either ‘and’ or ‘or’. It controls the relation between custom queries sent to do a custom filter/search on member. Example, when using ‘and’ as relation, you can filter users who are Male and live in Japan, and If set to ‘or’ you can get users who are Male OR live in Japan.
Turns on/off search feature on your member directory shortcode. By default this is set to 1.
Passing role=X will return users who have a specific role only. This can be multiple roles also. Example: role=author will return authors only, role=author,editor will return both authors and editors, etc.
Custom Field Filtering
To return users who meet a custom field condition. You can pass in this format custom_field=custom_value. Examples: country=”United States” will return all users from United States, you can also use comparison for example age=”18:25″ will match condition that user must be between 18 and 25 years whilst mixing custom fields like this: age=”>18″ country=”United States” will return users who live in Unites States and are older than 18 years old. You can use your custom fields to do custom filters the same way.
Display beautiful profile cards anywhere for the users you want. By default this shortcode shows the profile card of current profile.
This can be ‘author’ or ‘custom_username’, if you set this to author, the card of post author will be dynamically shown (e.g. on his posts/pages, etc). If you set user to a custom username, the card of that user will be displayed. Most regular usage is user=”author” which will display the card of author automatically.
This is the optimal card width, should be a complete value including pixels. The default value is 250px.
Should match the card width except that you do not need ‘px’ in the value.The default value is 250.
This can turn on/off the social links in the elegant card profile. Default value is 1.
This can turn on/off the user description in the elegant card profile. Default value is 1.
Show members in a compact list/style.
This overrides the default heading title for this widget. Default heading is ‘Latest Members’.
Setting this to true will disable the heading from this widget so you can apply your custom coded heading.
Setting this to true will disable the default box style applied to the compact members list so you can integrate/make it look like part of your background and design.
Number of members to return. By default the plugin will return 5 users in compact list. You can adjust that number via this option list_per_page=X.
Sort members by which rule, by default it sort members by ‘registered’ (Registration date) you can change this setting to sort members by name, e-mail, or another supported sorting method by WordPress.
The order in which members are displayed. By default it sort members in descending mode, default value is ‘desc’.
A comma seperated list of the users you want to promote or show in your compact members list. This will override the default members and will show only users you specify here. For example, you can show staff, or specific users (list_users=user1,user2,user3) etc.
This controls the width of thumbnail that is being displayed in compact member list. By default this is set to 50.
This can turn on/off the thumbnail display in compact members list. Default value is 1.
This can turn on/off the social links in compact members list. Default value is 1.
This can turn on/off the user description in compact members list. Default value is 1.
If you set this to 1 It means you will show only members who have the verified badge on their profile. Default is 0 turned off.
This controls the relation of meta queries, can be either ‘and’ or ‘or’. The default value is ‘or’.
Embeds the registration shortcode where the shortcode is placed.
This overrides the default heading that displays in Registration form. Default heading is Register an Account.
This controls the side text link in Registration heading. Default is ‘Already a member?’
This is the action that is taken when the link is clicked on side. Default to ‘login’ will show a login form to user.
This is the text that appears on Register button. Default to Register.
This is the text that appears on 2nd button, default to Login. Leave blank to disable this button.
This is the action that happens when the 2nd button is active (if it is enabled). By default it is set to ‘login’ (Will login user instead of register)
This is blank by default. Enter a custom URL if you want users to be redirected to a specific page after registration.
This can turn on/off recaptcha on registration forms. By default this is set to the global option you specified in plugin options for this.
Embeds the login shortcode where the shortcode is placed.
This overrides the default heading that displays in Login form. Default heading is Login.
This controls the side text link in Login form heading. Default is ‘Forgot your password?’
This is the action that is taken when the link is clicked on side. Default to ‘reset’ will show a password reset form.
This is the text that appears on Login button. Default to Login.
This is the text that appears on 2nd button, default to Create an Account. Leave blank to disable this button.
This is the action that happens when the 2nd button is active (if it is enabled). By default it is set to ‘register’ (Will register user instead of login)
This is blank by default. Enter a custom URL if you want users to be redirected to a specific page after login.
This can turn on/off recaptcha on login forms. By default this is set to the global option you specified in plugin options for this.
Display the posts made by user in grid or simple list layout.
This can be ‘grid’ or ‘compact’. Choose in which layout to show the posts made by user.
Number of posts to return. Default is 12.
This controls which post types are included in the post list. By default it shows ‘posts’ only. You can enter a comma seperated list of post types, e.g. to show posts, products, and custom post type enter postsbyuser_types=post,product,custom_type and to show all post types use postsbyuser_types=any (This option uses custom post type slugs)
This controls the size of post thumbnail if you are using ‘compact’ mode to display post list. By default this is set to 50 pixels.
This show/hide the thumbnail of post when using the ‘compact’ mode to display post list. By default this is set to 1.
This option can specify which user to return post list for. By default, it displays current user posts, or current profile posts. To show posts made by AUTHOR, set user=author and to show posts made by specific user set user=Custom_user