Help Docs Software LearnDash LearnDash MemberDash LearnDash MemberDash Shortcodes [ms-user]

[ms-user]

The [ms-user] shortcode controls visibility of content based on user type, regardless of membership level. This makes it useful for showing certain information to logged-in users, guests, administrators, or non-admins.

Parameters

The shortcode supports the following attributes:

msg (text)
A custom protection message shown to users who do not have access to the content
Default: empty

type (all | loggedin | guest | admin | non-admin)
Defines which type of users can see the content
Default: "loggedin"

Examples

Show content only to logged-in users (default):

[ms-user] You are logged in [/ms-user]

Show content only to guests with custom links:

[ms-user type="guest"] <a href="">Sign up now</a>! <a href="">Already have an account</a>? [/ms-user]

Conclusion

The [ms-user] shortcode provides a simple way to control content visibility based on whether a visitor is logged in, a guest, an administrator, or a non-admin. Combined with custom messages, it helps guide users toward the right actions, such as logging in or registering.

Was this article helpful?