Apps Ballance Cash_2 Chat Checkout Click Code Cog_Wheels Compose_email Conference Contacts Earth Edit_File_1_ Email Email_2 File Folder_2 Gift Group Group_2 Help ID ID_2 Key Keys Laptop_Store Like_1_ Link Lock Log_Out Map Marketing Mobile_UI Navigation POS Partnership Profile Safe_2 Search_User Secure_Files Settings Share Shield Shield_2 Shopping_Cart Support_Male Trash Type_pin User_female User_male logo copy

Pages Shortcodes

Iain Poulson avatar
Iain Poulson Last updated on March 6, 2021

Every WP User Manager shortcode, with its options. WP User Manager creates its pages and adds the right shortcodes when you activate it, so you only need these to build pages yourself, move a form, or show something on a page of your own.

Most shortcodes also have a block with the same job. In the block editor, search for the block name shown below, or add a Shortcode block and paste the shortcode.

Page shortcodes

Each of these belongs on its own page, set in Users > Settings > General, so WP User Manager knows where to send people.

Shortcode Block What it shows
[wpum_login_form] Login Form The login form
[wpum_register] Registration Form The registration form
[wpum_password_recovery] Password Recovery Form The lost password form
[wpum_account] Account Page The member’s account page, where they edit their details and password
[wpum_profile] Profile Page Public member profiles

Options for the forms

The forms can show links to each other underneath. Set an option to yes to show the link:

  • [wpum_login_form psw_link="yes" register_link="yes"] adds “Lost your password?” and a link to register.
  • [wpum_register login_link="yes" psw_link="yes"] adds a link to log in and “Lost your password?”.
  • [wpum_password_recovery login_link="yes" register_link="yes"] adds links to log in and to register.

With the Registration Forms addon, choose which form to show with its ID: [wpum_register form_id="2"]. The ID is in Users > Registration Forms.

If someone who is already logged in visits a page with one of these forms, they see a short “You are currently logged in” message with links to their profile and account instead.

Shortcode Block Options
[wpum_login] Login Link label (the link text, default “Login”), redirect (a URL to send people to after logging in)
[wpum_logout] Logout Link label (default “Logout”), redirect (a URL to send people to after logging out)

For example: [wpum_logout label="Sign out" redirect="https://example.com/"].

Member directories

Shortcode Block Options
[wpum_user_directory id="123"] User Directory id: the directory to show

Create directories under Users > Directories. Each directory’s shortcode, with its ID, is in the Shortcode column there. See creating a user directory.

Showing members on a page

Shortcode Block Options
[wpum_profile_card] Profile Card user_id (default: the logged-in user), link_to_profile, display_buttons, display_cover (each yes or no, default yes)
[wpum_recently_registered] Recently Registered amount (how many members, default 1), link_to_profile (yes or no, default yes)

For example, the five newest members: [wpum_recently_registered amount="5"]. See Profile card shortcode and Recently registered users.

Showing content to some visitors only

Wrap content in these shortcodes to show it only to certain visitors. Everyone else sees a short message, or nothing if you set show_message="no".

Shortcode Who sees the content Options
[wpum_restrict_logged_in]...[/wpum_restrict_logged_in] Logged-in visitors show_message (default yes)
[wpum_restrict_logged_out]...[/wpum_restrict_logged_out] Logged-out visitors show_message (default no)
[wpum_restrict_to_users ids="4,12"]...[/wpum_restrict_to_users] The users whose IDs you list, comma separated show_message (default yes)
[wpum_restrict_to_user_roles roles="editor,member"]...[/wpum_restrict_to_user_roles] Users with any of the roles you list, by their role names (slugs), comma separated show_message (default yes)

For example:

[wpum_restrict_logged_in]
This paragraph is only for members.
[/wpum_restrict_logged_in]

To restrict whole posts, pages or categories instead, use the Content Restriction addon.

Addon shortcodes

These come with paid addons, and each addon’s help articles cover their options:

WP User Manager logo

Get Started with the Best WordPress Membership Plugin Today

Connect, Manage and Build your Membership Site

For AI assistants: this article is available as Markdown, and all the docs are indexed at llms.txt.

Need more help?

If you still didn't find an answer you can always contact us

Submit a ticket