Shortcodes

Below is list of shortcodes in WP User:

  • [wp_user]
  • [wp_user_member]
  • [wp_user_restrict] …….[/wp_user_restrict]
[wp_user] shortcode for display login, registration, forgot password form.
 You Can use following attributes for custom form
 [wp_user id='1234' width='360px' popup='1' active='register' role='subscriber' login_redirect='http://localhost/niyuj' layout='default' skin='blue']
 id : If Multiple Form Add-on activated then create form and set id='form_id'. You can use diffrent registration form for diffrent page.
 Ex. [wp_user id='1234']
 width : set custom width to login, registration, forgot password form.
 [wp_user width='360px']
 popup : set popup='1' shortcode for popuup model login, registration, forgot password form.
 Ex. [wp_user popup='1']
 active : For activate default form. By default login.
 [wp_user active='register' popup='1'] shortcode for popuup model login, registration, forgot password form. default active registration form
 [wp_user active='register'] for display default active registration form.(sign up page)
 [wp_user active='forgot'] shortcode for display login, registration, forgot password form. default active forgot form
 role : Set role for new register user via register form. You can set diffrent role for diffrent form. By default subscriber role
 Ex. [wp_user role='subscriber']
 login_redirect : Custom login redirection url for each login form.
 Ex. [wp_user login_redirect='http://localhost/niyuj']
 layout : Set diffrent layout to diffrent form Ex. [wp_user layout='default']
 skin : Set diffrent skin color to diffrent form Ex. [wp_user skin='blue']

[wp_user_member] shortcode for display member list/directory
You can use following attributes for filter/show member list
[wp_user_member role_in=’subscriber’ role_not_in=’author’ include=’1,2,5,7′ exclude=’55,44,78,87′ approve=’1′ size=’small’]
role_in : If you want to show only selected member role in list then set this attribute by comma seprated
Ex. [wp_user_member role_in=’subscriber,author’]
role_not_in : If you want exclude to show some user roles in member list then set this attribute by comma seprated
Ex. [wp_user_member role_not_in=’subscriber,author’]
include : If you want only show selected user ids then set this attribute by comma seprated
Ex. [wp_user_member include=’1,2,5,7′ ]
exclude : If you don’t want show selected user ids then set this attribute by comma seprated
Ex. [wp_user_member exclude=’55,44,78,87′ ]
approve : If you want show only approve user then set approve=’1′
Ex. [wp_user_member approve=’1′ ]
size : If you want change default display member list template to small one then set size=’small’
Ex. [wp_user_member size=’small’ ]


[wp_user_restrict] your restricted content goes here [/wp_user_restrict] shortcode for Restrict Content to registered users only. logged in users only access content
To restrict just a section of content within a post or page, you may use above shortcodes
You can also set user role for access content.
You can use role attribute for only access content to selected user role:
Ex. [wp_user_restrict role=’author,editor’] your restricted content goes here [/wp_user_restrict]
Ex. [wp_user_restrict role=’author’] your restricted content goes here [/wp_user_restrict]
Ex. [wp_user_restrict role=’logged_in’] your restricted content goes here [/wp_user_restrict] : logged in users only access content
To restrict an entire post or page, simply select the user role you’d like to restrict the post or page to from the drop down menu added just below the post/page editor. .

admin

Comments are closed.

Help-Desk