UPME Shortcodes

Introduction to UPME Shortcodes

UPME provides wide range of shortcodes for applying UPME features anywhere on your site. Most of the UPME features depends upon these shortcodes and hence its essential to know all the possibilities to use them in different scenarios. All the shortcodes stars with upme_ prefix and hence its easy to identify. Let’s look at all the available shortcodes with their attributes using the following section.

Registration Shortcode

Registration shortcode let’s you embed registration form inside pages/posts/widgets or any other custom page.You have to use [[upme_registration]] for the registration shortcode. This shortcode provide many attributes as listed below.

  • redirect_to

    Used for registration Form with custom redirect. Default value is NULL.

    [[upme_registration redirect_to="http://url_here"]]

  • captcha

    Used for captcha options in registration form.Default value is no.

    [[upme_registration captcha=no] – Show the registration form without captcha, even if a captcha is set in UPME settings.
    [[upme_registration captcha=recaptcha]] or [[upme_registration captcha=funcaptcha]] – Specify the captcha to be used with registration.

  • use_in_sidebar

    Used for adding registration form to sidebar widgets.Default value is NULL.

    [[upme_registration use_in_sidebar="yes"]]

  • name

    Used for multiple registration forms with different names.Default value is arandom string.

    [[upme_registration name='member_registration' ] – Add specific name to registration form to load different fields on different registration forms. If not specified, this will add a dynamic random string as the name.

  • user_role

    Used for registration forms with different user roles.Default value is NULL.

    [[upme_registration user_role='author' ] – Add specific user role to the registration form. Once user_role attribute is added, all users registred with this form will get the defined user role instead of default user role.

  • display_login

    Used for displaying login link on registration form.Default value is no.

    [[upme_registration display_login= 'yes' ] – By default its set to No. If specified, it will show the login link inline with the register button.

Login Shortcode

Login shortcode let’s you embed registration form inside pages/posts/widgets or any other custom page.You have to use [[upme_login]] for the login shortcode. This shortcode provide many attributes as listed below.

  • redirect_to

    Used for registration Form with custom redirect. Default value is redirection value set based on the URL.

    [[upme_login redirect_to="http://url_here"]]

  • use_in_sidebar

    Used for adding login form in sidebar widget.Default value is NULL.It is recommended to use the UPME Login widget,however you can also use this method.This will change the CSS styling to better fit inside a small width sidebar. It will also link to the user profile page for editing when the user is logged in.

    [[upme_login use_in_sidebar="yes"]]

  • captcha

    Used for enabling captcha verification on login form.Default value is no.

    [[upme_login captcha=yes]] – Show the Login Form with captcha,uses the captcha plugn selected in UPME settings.You can specify the captcha to be used with the following: [[upme_login captcha=recaptcha]].

  • name

    Used for multiple registration forms with different names.Default value is random string.

    [[upme_login name= 'author_login' ] – Add custom login form name for specifying multiple login forms based on different conditions..

  • register_link

    Used for specifying the display status of registration link in login form.Default value is yes.

    [[upme_login register_link=no]] – You can hide the registration link from login form by setting the register_link value to no.

  • forgot_link

    Used for specifying the display status of forgot password link in login form.Default value is yes.

    [[upme_login forgot_link=no]] – You can hide the forgot password link from login form by setting the forgot_link value to no.

  • register_text

    Used for displaying custom label for registration link in login form.Default value is Register.

    [[upme_login register_text=Join ] – You can customize the register link by setting the register_text value to a custom value.

  • forgot_text

    Used for displaying custom label for forgot password link in login form.Default value is Forgot?.

    [[upme_login forgot_text=Forgot ] – You can customize the forgot password link by setting the forgot_text value to a custom value.

  • custom_register_url

    Used for customizing the URL of registration form page.Default value is empty.

    [[upme_login custom_register_url=http://your-link-here.com]] – Add custom URL for registration page link.

  • custom_forgot_url

    Used for customizing the URL of forgot password form page.Default value is empty.

    [[upme_login custom_forgot_url=http://your-link-here.com]] – Add custom URL for forgot password page link.

Private Content Shortcode

Private content shortcode let’s you display/hide your page/post contents based on wide range of different criterias.You have to use [[upme_private]Content[/upme_private]] for the private content shortcode. This shortcode provide many attributes as listed below.

  • allowed_roles

    Used for allowing content for users with specified roles.Default value is NULL.

    [[upme_private allowed_roles=subscriber,editor]Member only content[/upme_private]] – a comma separated list of user roles that you want to be allowed to view this private content.This is entirely optional. If you do not specify any user roles here, content will be allowed for all loggedin users.If you specify user roles with this option, only the users with specified user roles will be able to view this content.

  • blocked_roles

    Used for blocking content for users with specified roles.Default value is NULL.

    [[upme_private blocked_roles=subscriber,editor]Member only content[/upme_private]] – a comma separated list of user roles that you want to be restricted from viewing this private content.This is entirely optional. If you do not specify any user roles here, content will be allowed for all loggedin users.If you specify user roles with this option, the users with specified user roles will not be able to view this content.

  • allowed_users

    Used for allowing content for specified User ID’s.Default value is NULL.

    [[upme_private allowed_users=1,12]Member only content[/upme_private]] – a comma separated list of user ID’s that you want to be allowed to view this private content. This is entirely optional. If you do not specify any user ID’s here, content will be allowed for all loggedin users.If you specify user ID’s with this option, the users with specified ID’s will be able to view this content.

  • blocked_users

    Used for blocking content for specified User ID’s.Default value is NULL.

    [[upme_private blocked_users=1,12]Member only content[/upme_private]] – a comma separated list of user ID’s that you want to be restricted from viewing this private content.This is entirely optional. If you do not specify any user ID’s here, content will be allowed for all loggedin users.If you specify user ID’s with this option, the users with specified ID’s will not be able to view this content.

  • allowed_meta_key

    Used for allowing content for users with specified value for specified custom field.Default value is NULL.

    [[upme_private allowed_meta_key=Country allowed_meta_value='United Status']Member only content[/upme_private]] – a meta key of custom field and its meta value.This is entirely optional. If you do not specify a meta key and value here, content will be allowed for all loggedin users.If you specify meta key and meta value with this option, only the users with specified value for the meta field will be able to view this content. It’s mandatory to use allowed_meta_value attribute, when using allowed_meta_key attribute.

  • blocked_meta_key

    Used for blocking content for users with specified value for specified custom field.Default value is NULL.

    [[upme_private blocked_meta_key=Country blocked_meta_value='United Status']Member only content[/upme_private]] – a meta key of custom field and its meta value.This is entirely optional. If you do not specify a meta key and value here, content will be allowed for all loggedin users.If you specify meta key and meta value with this option, only the users who don’t have the specified value for the meta field will be able to view this content. It’s mandatory to use allowed_meta_value attribute, when using allowed_meta_key attribute.

Search Shortcode

Search shortcode let’s you embed search form inside pages/posts/widgets or any other custom page to let users search the members in the site.You have to use [[upme_search]] for the search shortcode. The default search form will search all text profile fields.

You will need to include [[upme group=all view=compact users_per_page=10]] shrotcode
on the same page below the search form to show the results.You can use or modify any of the view/role/pagination etc. options in the above shortcode to display the search results differently or restrict the search to only specific users or roles.This shortcode provide many attributes as listed below.

  • fields

    Used for specifying the fields used for search. Default value is NULL.

    [[upme_search fields=X,X,X]] – a comma separated list of
    custom field meta keys that you want to be included in the search.This is entirely optional. If you do not specify any text fields here, all text fields will be searched.If you specify text fields with this option, only the specified text fields will be searched, the default fields will be excluded.

  • filters

    Used for adding input filters to search form. Default value is NULL.

    [[upme_search filters=X,X,X]] – a comma separated list of custom field meta keys that you want to be displayed as filters on the search form.Filters for text fields will allow the user to type a value for the specified field to search on.Filters for non-text fields will be displayed as dropdowns or multi-select (for checkboxes) where the user can choose from available optiosn to filter by.

  • exclude_fields

    Used for excluding fields from searching. Default value is NULL.

    [[upme_search exclude_fields=X,X,X]] – a comma separated list of custom field meta keys that you do not want to be included in the search.You can use this option to exclude some text fields from the default search.

  • operator

    Used for specify the search operator. Default value is AND.

    [[upme_search operator=AND]] – returns only users that match all search criteria and filters.
    [[upme_search operator=OR]] – returns users that match any of the specified criteria and filters.

  • use_in_sidebar

    Used for place the search form on sidebar and display the results in member list page. Default value is NULL.

    [[upme_search use_in_sidebar=yes]] – This is entirely optional. You can decide to show the search inside a page or in the sidebar.

  • users_are_called

    Used for change the text display for users. Default value is User.

    [[upme_search users_are_called=Members]] – This is entirely optional.

  • combined_search_text

    Used to change the text displayed inside the search box.. Default value is Combined Search.

    [[upme_search combined_search_text='Search Here']] – This is entirely optional.

  • button_text

    Used to change the text displayed on search button. Default value is Filter.

    [[upme_search button_text='Search Users']] – This is entirely optional.

  • reset_button_text

    Used for change the text displayed inside the search reset button. Default value is Reset.

    [[upme_search reset_button_text='Reset Search']]– This is entirely optional.

  • show_combined_search

    Used to hide combined search option and only use the search on search filters. Default value is TRUE.

    [[upme_search show_combined_search=yes]] – This is entirely optional.

  • name

    Used for adding multiple search forms with unique names. Default value is random string.

    [[upme_search name='member_search' ]] – Add specific name to search form to load different filters on different search forms. If not specified, this will add a dynamic random string as the name.

Profile Shortcode

Profile shortcode let’s you embed the profile of user inside pages/posts/widgets or any other custom page.You have to use [[upme]] for the profile shortcode. This shortcode provide many attributes as listed below.

  • id

    Used for displaying profile based on user ID/ID’s . Default value is NULL.

    [[upme id=X]] – retrieves a specific profile of the
    passed user ID. You can use multiple ID’s separated by commas.
    [[upme id=author]] shows the author profile of
    the current page or post

  • view

    Used for specifying the the type of view for profiles. Default value is NULL.

    [[upme view=X,X,X]] – a comma separated list of profile fields (meta key or position) that you want to be included only in the profile view.
    [[upme view=compact]] – Hides all profile fields, and
    shows a compact style profile view.

  • show_id

    Used for displaying the ID of the user inside the profile. Default value is FALSE.

    [[upme show_id=true]] OR [[upme show_id=yes]]

  • show_stats

    Used for hiding/displaying user statistics (entries, comments, etc.). Default value is NULL. Stats section is displayed by default.

    [[upme show_stats=no]] OR [[upme show_stats=false]]

  • show_social_bar

    Used for displaying/hiding social icons on profile. Default value is NULL.Social bar is displayed by default.

    [[upme show_social_bar=no]]code> OR [[upme show_social_bar=false]]

  • use_in_sidebar

    Used for displaying profile in sidebar with proper styles. Default value is NULL.

    [[upme use_in_sidebar=yes]]

  • show_role

    Used for displaying the user role inside the profile. Default value is FALSE.

    [[upme show_role=true]] or [[upme show_role=yes]]

  • logout_redirect

    Used for specifying the redirect URL after the logout button is clicked from the profile. Default value is NULL.

    [[upme logout_redirect='http://url_here']]

  • show_profile_status

    Used to show/hide the user profile status inside the View Profile section. Default value is FALSE.

    [[upme show_profile_status=yes]] or [[upme show_profile_status=true]]

  • name

    Used to add specific name to profile form to load different fields on different profile
    forms. Default value is random string.

    [[upme name='member_profile' ]]

Member List Shortcode

Member list shortcode let’s you embed list of members inside pages/posts/widgets or any other custom page.You have to use [[upme group=all]] for this shortcode. This shortcode is an extended version of profile shortcode and hence you can use all the attributes in profile shortcode with this member list shortcode. Apart from the common attributes, this shortcode provide many other attributes as listed below.

  • group

    Used for displaying group of profiles. This is mandatory for member list. Default value is NULL.

    [[upme group=all] – Displays All User Profiles.
    [[upme group=user_1,user_2,user_3,etc]] – display multiple profiles of specified users, pass a comma separated list of all user IDs you want to show.

  • group_meta + group_meta_value

    Used for displaying group of users based value of a custom field. Default value is NULL.

    [[upme group=all group_meta=country group_meta_value='United States']] – show all users that have ‘United States’ set for the field with meta ID of ‘country’. You can replace the word ‘country’ with your meta key, and ‘United States’ with your matching value.

  • hide_until_search

    Used for hiding the user list until search is completed. Default value is NULL.

    [[upme group=all hide_until_search=true]] – First add the search shortcode [[upme_search]]. Then add [[upme group=all hide_until_search=true]] to hide member list and only display it for search results.

  • order

    Used for sorting the results to ASC/DESC. Default value is DESC.

    [[upme group=all order=desc]]

  • orderby

    Used for specifying the sort field for member list. Default value is registered.

    [[upme group=all orderby=registered]] – sort the users by registered date.
    [[upme group=all orderby=post_count]] – sort the users by post count.
    [[upme group=all orderby=first_name orderby_custom=yes]] – sort the users by post count.
    Possible values for orderby: ID, login, nicename, email, url, registered, display_name, or post_count. You can also use custom fields meta keys as orderby value, once you set orderby_custom=yes

  • orderby_custom

    Used for enabling custom fields as sort field. Default value is FALSE.

    [[upme group=all orderby_custom=yes]] – Once set to yes, you can use meta keys of custom fields for the orderby value.

  • role

    Used for displaying users of given role(s). Default value is NULL.

    [[upme group=all role=subscriber]] – multiple roles can be also added using comma separated role names.[[upme group=all role=subscriber,editor]]

  • users_per_page

    Used for enabling pagination on member list and limiting the results of a single page. Default value is 50.

    [[upme group=all users_per_page=10]]

  • width

    Used for displaying profiles on a column based view with 2 or 3 profiles per one row. Default value is 1.

    [[upme group=all width=2]] or [[upme group=all width=3]]

  • new_window

    Used for opening the profiles in a new window from the members list. Default value is NULL.

    [[upme group=all view=compact new_window=yes]] or [[upme group=all view=compact new_window=true]]

  • modal

    Used for opening profiles in a modal window from a member list with compact view . Default value is NULL.

    [[upme group=all view=compact modal=yes]] or [[upme group=all view=compact modal=true]].

  • show_result_count

    Used to show/hide the number of results generated in the search. Default value is FALSE.

    [[upme group=all show_result_count=yes]] or [[upme group=all show_result_count=true]]

  • limit_results

    Used to limit the member list to fixed number of users without pagination. Default value is FALSE.

    [[upme group=all limit_results=yes users_per_page=5 ]]

  • hide_admins

    Used to hide administrators from the member list . Default value is FALSE.

    [[upme group=all hide_admins=yes ]]

  • show_random

    Used to display random list of users in member list. If not specified, member list will be sorted by the orderby attribute. Default value is no.

    [[upme group=all show_random='yes' ]]

  • result_range_start

    Used to start displaying the random member list from specified number in resultset. Currently, its only available for random user lists. Default value is FALSE.

    [[upme group=all show_random='yes' result_range_start='3']]

  • result_range_count

    Used to define how many users to display starting from result_range_start value. Currently, its only available for random user lists. Default value is FALSE.

    [[upme group=all show_random='yes' result_range_start='3' result_range_count='4']

Tips for Using UPME Shortcodes

Coming Soon

Practical Usage of Shortcodes

Coming Soon