• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

RocketGeek

Home of WP-Members, The Original WordPress Membership Plugin

  • WordPress Plugins
    • WP-Members
      • FAQs
      • Quick Start
      • Documentation
      • Extensions
    • Advanced Options
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Download Protect
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Invite Codes
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • MailChimp Integration
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • PayPal Subscriptions
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Salesforce Web-to-Lead
    • Security
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Text Editor
      • Purchase the Plugin
      • Get the Pro Bundle
    • User List
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • User Tracking
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Memberships for WooCommerce
    • WordPass
  • Blog
    • Basics
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Store
    • Cart
    • Checkout
  • Contact
  • Log In
  • Show Search
Hide Search
Home » Plugins » WP-Members » Documentation » Shortcodes » Other Shortcodes

Other Shortcodes

On final evaluation of the new form fields filter, the hook name has been changed to wpmem_fields. Anyone using the above script that has it as wpmem_form_fields should change it to wpmem_fields when you update to 3.1.7 final release (or beta release candidate RC 3).

wpmem_logout

This shortcode displays a logout link wherever you want it.

[wpmem_logout]

By default, the link text will be “Click here to logout.”  If you want custom text, nest it in the shortcode:

[wpmem_logout]My Custom Log Out Text[/wpmem_logout]

wpmem_loginout

This shortcode displays a login/logout link, depending on the user’s login state.  Note: this shortcode requires that a login page location be set in the plugin’s main options.

[wpmem_loginout]

Default text for the links is “log in” and “log out”.  These can be changed with the following attributes (3.1.5+):

[wpmem_loginout login_text="Sign In" logout_text="Sign Out"]

Note: both text attributes are optional. You can use one or the other, both, or neither.

There is also a redirect attribute for login (3.1.5+):

[wpmem_loginout login_redirect_to="http://mysite.com/my-page/"]

wpmem_show_count

This shortcode displays a count of users. It can be used to display a total count of users on the site, users by role, or users by the value of a meta key.

Show a total count of site users (includes all roles) (3.1.5+):

[wpmem_show_count]

Number of Site Users: [wpmem_show_count]

Show a count of users for a particular role (3.1.5+):

[wpmem_show_count role="role_slug"]

Show a count of users for a given meta key:

[wpmem_show_count key="some_key" value="some_value"]

Include an optional label in the shortcode:

[wpmem_show_count label="Total Users:"]

[wpmem_show_count role="subscribers" label="Total Subscribers:"]

[wpmem_show_count key="active" value="1" label="Total Active Users:"]

wpmem_avatar

This shortcode can be used to display a user’s avatar image.  NOTE: WP uses gravatar by default.

To show a user avatar that defaults to the current user:

[wpmem_avatar]

To show an avatar for a specific user, pass the user’s email or ID using the “id” attribute:

[wpmem_avatar id=someuser@example.com]

[wpmem_avatar id=123]

wpmem_login_link & wpmem_reg_link

This shortcode generates a link to the login page or register page (if one is set in the main options).

[wpmem_login_link]

[wpmem_reg_link]

The default text for the link will be either “Log In” or “Register” (depending on the shortcode used).  Both shortcodes allow you to customize the text by nesting the content:

[wpmem_login_link]Log In Here[/wpmem_login_link]

[wpmem_reg_link]You may register here[/wpmem_reg_link]

Both links provide a redirect URL to the original page (the page the link was on).

  • Getting Started
  • Recommended WordPress® Settings
  • Plugin Settings
    • Options
    • Fields
    • Dialogs
    • Emails
    • New Feature Settings
  • Managing Content
    • Restricting Posts
    • Restricting Pages
    • Show Excerpts
    • Custom Post Types
  • Managing Users
    • Import Users
    • Export Users
    • Edit Users
    • Search Users
  • Login
  • Registration
    • Choosing Fields
    • Create a Registration Page
    • Moderating Registration
    • Using CAPTCHA
    • Removing Registration Options
  • User Profile
  • Memberships
    • Membership Properties
    • Membership Levels
  • Menus
    • Individual Menu Items
    • Logged In Menus
    • Login/Logout Menu Link
  • Customizing Emails
    • Email Address
    • Email Content
    • Email Format
    • Email Shortcodes
    • Email Troubleshooting
  • Customizing Forms
    • Create a Custom Stylesheet
    • Using the WordPress Customizer
    • Login Form HTML
    • Registration Form HTML
    • Widget Login Form HTML
  • Translation and Localization
    • Maintain a custom translation file
    • Filter untranslated strings
    • Multi-language Considerations
  • Shortcodes
    • Pages and Forms
    • Login Status
    • User Fields
    • Memberships
    • Email
    • Other Shortcodes
  • WP-CLI Commands
  • API Functions
  • Filter Hooks
  • Action Hooks
  • FAQs
    • Email troubleshooting
    • Passwords are not being included in Emails
    • The plugin isn’t blocking my content
    • Are files protected?
    • How can I prevent registration spam?
    • How to add a shortcode
    • How to apply login redirects
    • Why can’t users log in?
    • Why does reCAPTCHA v3 fail?
    • Troubleshooting Really Simple Captcha
    • Why do I get a 403 error?
    • How do I use code snippets?
    • My changes aren’t showing up
    • How to hide the “Admin Bar”
    • How to add a forgot password link
    • Password reset doesn’t show any fields
    • Domain not included in the password reset link
    • There was an error processing the form
    • Hidden vs. Restricted
  • Demo Videos
  • How to Request Support
  • Copy Settings for Support
  • Hosting Recommendations

Ready to get started?

Join Today!

© 2025 · butlerblog.com · RocketGeek is built using WordPress, WP-Members, and the Genesis Framework

  • butlerblog.com
  • WP-Members Support Subscription
  • Terms of Service
  • Privacy Policy
  • Refund Policy