This Applies to
OTHER DOCS Available


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

Shortcode Examples

Check a radio button in a form if the user has multiple tags:

<input type=radio name=foo value=123 [memb_has_all_tags tagid=101,103 output=checked] >

Check a checkbox in a form if the user has multiple tags:

<input type=checkbox name=foo value=123 [memb_has_all_tags tagid=101,103 output=checked] >

Select a dropdown option if the user has multiple tags:

<option value=foo [memb_has_all_tags tagid=103,105 output=selected] >Foo</option>

Display “Yes” or “No” if the user has multiple tags:

[memb_has_all_tags tagid=105,107]

Display output only if the user has multiple tags:

[memb_has_all_tags tagid=107,109 output=You have both tags!]
[memb_has_all_tags tagid=107,109] You have both tags! [/memb_has_all_tags]

Display output only if the user does not have the tag:

[memb_has_all_tags tagid=109,11 not=not output=You do not have both tags!]

Shown to users with these tags [else_memb_has_all_tags] Shown if user doesn’t have specified tags [/memb_has_all_tags]

[memb_has_all_tags tagid=101,102]
   Shown to users with both of these tags
   Shown if user doesn’t have both specified tags


Shortcode Parameters​

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

contact_id: The contact ID of a different contact.  Optional.

except_contact_ids:  A comma-separated list of Infusionsoft Contact ID’s that the current user must not be one of in order for the test to succeed.

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) 

tagids, tag_ids, tagid: A comma separated list of tag names or IDs.  All tags listed must be held to succeed.

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_all_tags] shortcode is entirely optional.  If you skip the [else_memb_has_all_tags] 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.