This Applies to
OTHER DOCS Available

Shortcode Video


Conditional shortcode to control access to portions of a post, page or widget based on the logged in user’s membership level.

Shortcode Examples

[memb_has_membership memberships=gold]
   Shown to users with the gold membership level
   Shown if user doesn’t have the gold membership level

If you’d like to restrict access to allow more than one group to see content, while restricting others who don’t have those memberships, you can do so by separating each membership name with a comma.

[memb_has_membership memberships=gold,silver]
   Shown to users with either gold or silver or both
   Shown if user doesn’t have specified tags

If you have spaces in your Membership names then add quotes around the comma seperated list. For instance, [memb_has_membership memberships=”Gold Level”] or [memb_has_membership memberships=”Gold,Silver,All Access”]

Shortcode Parameters​

capture:  Capture the output of the shortcode and route it to a variable for later use. (?)

memberships: A comma separated list of membership names to check for.

not:  You can use the attribute not=”not”, to reverse the results of the test.

output: Content to be displayed if the test is successful. (Optional, Added in 2.45)

txtfmt: A comma separated list of text processing functions to be used to post process the contact fields. (?)

Shortcode Attributes

Conditional: Yes (?)
Nestable: Yes (?)
Accepts formatting: Yes (?)
Capturable: Yes (?)

Additional Information

The [else_memb_has_membership] shortcode is entirely optional.  If you skip the [else clause, then the contents of the shortcode will only be displayed on success, and nothing will be displayed on failure.

For more complex conditions, you can nest conditional shortcodes within each other.

In order to keep things clear, as you nest your shortcodes, put a digit at the end of the shortcode name, so that the shortcode processor can tell which shortcode pieces go together.

For example:


If the shortcodes end before the next one starts, you are not nesting them and do not need to number them:



If you are nesting different shortcodes, you do not need to number them:



  • Was this Helpful?
  • YesNo
9 ways to add more value to your membership site


This Applies To

Book a Call

Welcome to Memberium!

We are very excited for you to be part of our family. 

We would love to answer any questions that you have!

Please choose the best time for you to get in a call with us. 

For Technical Support, you can contact us at https://keap.memberium.com/support/ or Email us at support@memberium.com.