Ultimate Member - Shortcodes

Overview

Ultimate Member simplifies the integration of dynamic forms into WordPress pages and posts through the use of WordPress shortcodes. Ultimate Member boasts an array of shortcodes designed to seamlessly display different components of the plugin, including user profiles, registration forms, and more.

Core Plugin #

Pages #

Account #

The shortcode that displays the account form is [ultimatemember_account]. This is the predefined content of the Account page.

Note: The account shortcode must be placed on the Account page. This shortcode cannot be used on pages other than the Account page.

Users can further customize their experience by showcasing specific account tabs through [ultimatemember_account tab="tab id"], as exemplified by [ultimatemember_account tab="password"]. The tab id, representing the section displayed in the URL (e.g., /account/general), allows users to seamlessly navigate between different account tabs.

Password Reset #

For the password reset functionality, the plugin provides the [ultimatemember_password] shortcode. This is the predefined content of the Password Reset page.

Login, Registration, User #

Critical to user interaction, shortcodes for Login, Registration, and User pages are readily available within the WordPress admin interface under Ultimate Member > Forms, ensuring easy access and customization for these essential pages.

The plugin creates the default Registration, Login and Profile forms on the plugin installation. The "Default Registration" shortcode is the predefined content of the Register page. The "Default Login" shortcode is the predefined content of the Login page. The "Default Profile" shortcode is the predefined content of the User page. 

You can create additional forms of these three types. After creating the form, copy the form shortcode and paste it into the related page.

Note: The profile form shortcode must be placed on the User page. This shortcode cannot be used on pages other than the User page.

Members #

To enhance member directory functionality, administrators can incorporate shortcodes for member directories effortlessly. These specific shortcodes are conveniently located in the WordPress admin interface under Ultimate Member > Member Directories, providing a seamless way to manage and display member directories on the website.

Restrict Content #

Show Content to Specific Roles #

For a detailed explanation of how these shortcodes work, kindly refer to the article "Restrict Content on a Page/Post to Specific Users' Community Role." This resource provides comprehensive insights into the functionality and usage of the mentioned shortcodes below.

[um_show_content roles="member"] Only the member role can see this content. [/um_show_content] - This shortcode displays content exclusively to members.

[um_show_content not="member"] Only non-member roles can see this content. [/um_show_content] - This shortcode restricts content to non-member roles.

Note: The role required for use in the shortcode is the Role ID. To ascertain the Role ID of a user, navigate to wp-admin > Ultimate Member > User Roles. Refer to the image below for visual guidance.

Show Content for Logged-In Users #

[um_loggedin] This text can only be seen by logged in users [/um_loggedin]

This shortcode exclusively reveals content to users who are logged in. For a detailed explanation of its functionality, please refer to this article: Restrict Content on a Page/Post to Logged-In Users.

Show Content for Logged-Out Users #

[um_loggedout] This text can only be seen by logged out users [/um_loggedout]

This shortcode conceals content from logged-in users, making it accessible exclusively to those who are logged out. For a comprehensive understanding of its functionality, please consult this article Restrict Content on a Page/Post to Logged-Out Users.

Search Users #

Integrate the search form seamlessly using [ultimatemember_searchform]. Ensure that the search feature in the member directory is enabled - go to wp-admin > Ultimate Member > Member Directory > Edit Member Directory and turn on the Enable Search feature setting.

The image below provides an example of how the shortcode appears when added to a page.

User Profile URL #

This shortcode facilitates the retrieval of User Profile URLs. Below are examples showcasing the versatility of this new functionality:

  • [um_author_profile_link] - This shortcode retrieves the User Profile URL of the current post author.

  • [um_author_profile_link title="Content Contributor" user_id="11"] - This shortcode retrieves the User Profile URL for the user with ID 11, with a custom title.

  • [um_author_profile_link title="Contributor" user_id="11"]Visit Contributor Profile[/um_author_profile_link] - This shortcode is similar to the example above, featuring an embedded anchor text that reads "Visit Contributor Profile".

  • [um_author_profile_link raw="1"] - This shortcode generates a raw URL output, e.g., https://ultimate-member-32669-3028774.umsites.net/user/admin/, but please note that the URL is not rendered as clickable.


Extensions#

We have compiled individual shortcode documents for each extension. The following list provides links to the respective documentation for your reference.