[memb_is_logged_in]

This Applies to
OTHER DOCS Available

Summary

Only shows content wrapped in shortcode if a member is logged in. Can be set to display alternate content if not logged in.

Shortcode Examples

[memb_is_logged_in]
   Shown to users who are logged in.
[else_memb_is_logged_in]
   Shown to users who are not logged in
[/memb_is_logged_in]

This shortcode is used to restrict access of content to users who are logged in, while excluding those who are not. It can be used as a standalone shortcode, such as:

[memb_is_logged_in]
   This is shown to logged in users only
[/memb_is_logged_in]

The image below shows what those who are logged in will see:

6

The image below is what those who are logged out will see:

7

Absolutely nothing.

One use of this code, is in conjunction with [memb_loginform] and [logout_link], the login form being shown to users who are not logged in, and the logout link being available to those who are logged in.

[memb_is_logged_in]
[memb_logout_link]
[else_memb_is_logged_in]
[memb_loginform]
[/memb_is_logged_in]

The below image shows the login form:

9

The image below shows the logout link

8

If you’d like to take it a step further, you can add a [memb_send_password] tag, in with the already existing code.

[memb_is_logged_in]
[memb_logout_link]
[else_memb_is_logged_in]
[memb_loginform]
[memb_send_password]
[/memb_is_logged_in]

10

However, that can be rather crowded. A less bulky way to do this would be to make a “Forgot Password” page, and simply have the [memb_send_password] code on it.

[memb_is_logged_in]
[memb_logout_link]
[else_memb_is_logged_in]
[memb_loginform]
<a href=”YOUR FORGOT PASSWORD PAGE”>Forgot your password?</a>
[/memb_is_logged_in]

 

Advanced Usage

   For a more advanced application of [memb_is_logged_in], you can nest them within each other.

[memb_is_logged_in]
[memb_is_logged_in1]
[else_memb_is_logged_in1]
[/memb_is_logged_in1]
[/memb_is_logged_in]

Shortcodes Used

1. [memb_loginform] – A simple two field login form. Requests Email and Password.
2. [memb_logout_link] – Displays a link that logs a user out.
3. [memb_send_password] – Displays an email field and sends a user their password.

 

Shortcode Attributes

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

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

[memb_is_logged_in]

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.