Conditional Shortcodes

Conditional shortcodes perform a test and then display (or don’t display) the content within the shortcode depending on the result of the test. Conditional shortcodes are often nestable so that you can perform multiple tests. All tests are binary meaning they resolve to a simple true-false / sucess-fail / yes-no condition.

Conditional shortcodes usually start with a word like is or has, asserting a condition.

Conditional shortcodes can be used three different ways:

Single shortcode – displays “Yes” if the shortcode test passes, displays “No” on test failure.

As of Version 2.43, you can use [else_memb_shortcodename] or [else_shortcodename] interchangeably.

Example:

[memb_is_logged_in]

Shortcode with content – wraps a single block of content in the conditional tag. The content in the shortcode is displayed if the test passes, and not displayed if the test fails.

Example:

[memb_is_logged_in] You are Logged In [/memb_is_logged_in]

Shortcode with alternate content – wraps TWO blocks of content separated by an [else_] shortcode. The first block is displayed if the test passes, the second block is displayed if the test fails.

Example:

[memb_is_logged_in]
You are Logged in
[else_memb_is_logged_in]
You are not logged in
[/memb_is_logged_in]
  • Was this Helpful?
  • YesNo
9 ways to add more value to your membership site

Table of Contents

Keep Reading

Login Actionset

This setting gives you the ability to set an Infusionsoft actionset that will run at login. The actionset will run on the user that’s logging in.

Read More »

Advice On Building a Startup and Improving Customer Retention with Kyle Leavitt [Episode 20]

On today’s episode, Kyle Leavitt will be joining us. We discuss building a startup and what it takes to build one from the ground up. Kyle shares his advice on improving customer retention, increasing customer loyalty and the importance of core values in a business.

Kyle Leavitt is the recent co-founder of LoyalStream. He had also co-founded CustomerHub, which he sold to Infusionsoft, where he became a key leader who helped grow the company from $1M to $100M+ in annual recurring revenue.

Kyle joined Infusionsoft in 2005 then started talking to entrepreneurs every day on the phone and selling Infusionsoft to them. He left Infusionsoft in 2008 and started a software business with his brother and business partner called CustomerHub, which he then sold back to Infusionsoft and joined the product team where he served as Director of Product Management and later VP of Product.

Read More »

Want to get some fresh ideas on how you can improve your membership site or course?

Download our free ebook!

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.