[memb_is_logged_in]

[memb_is_logged_in]] Shortcode Documentation

The [[memb_is_logged_in]] shortcode allows you to conditionally display content on your WordPress site based on whether a user is logged in. This is useful for creating personalized experiences for logged-in users or hiding content from visitors who are not authenticated.

Usage

[[memb_is_logged_in]]
Your content here.
[[/memb_is_logged_in]

Description
When the [ tags will be displayed if the user is logged in.
Examples
Basic Example:

If the user is logged in, they will see:
Welcome back, valued member!
If the user is not logged in, nothing will be displayed.
Custom Message for Logged-In Users:

Displays a custom message with a link to the dashboard for logged-in users.
Notes
This shortcode is designed to work seamlessly with the Torii Enterprise Membership System plugin.
Administrators and other logged-in users will see the content as long as they are authenticated.
For more complex conditional logic, consider using other shortcodes provided by the plugin, such as [memb_has_any_tags].
Technical Details
The No shortcode is powered by the elf_shortcode_is_logged_in() method in the torii_shortcodes_conditional_class. This method uses WordPress’s is_user_logged_in() function to determine the user’s login status and routes the output through the elf_route_conditional_output() method for consistent handling.

Troubleshooting
Content Not Displaying: Ensure the user is logged in. If the user is not authenticated, the shortcode will not display any content.
Caching Issues: If you are using a caching plugin, ensure that pages with this shortcode are excluded from caching to avoid displaying incorrect content to users.
Related Shortcodes
[memb_has_any_tags]: Display content based on user tags.
[memb_has_any_memberships]: Display content based on user memberships.
For further assistance, refer to the Torii Enterprise Membership System documentation or contact support.