Search for answers:
Customer Notices: WordPress 4.5 Affects LiveEditor Functionality - See this article WordFence Plugin Affects LiveEditor - See this article

Using OptimizeMember Shortcodes to Hide/Show Content

To hide an element on logged out members:

[opmIf is_user_logged_in()]
Content for anyone that is logged in, regardless of their Membership Level.
[/opmIf]


To hide an element on logged in members:

[opmIf !is_user_logged_in()]
Some public content. They're NOT logged in.
A leading !exclamation means false.
[/opmIf]


Hiding elements based on membership level:

[opmIf current_user_can(access_optimizemember_level1)]
Content for members who are logged in with an optimizeMember Level >= 1.
[/opmIf]

Membership levels provide incremental access so members having higher levels can also see the element.


Hiding elements based on package/custom capabilities:

[_opmIf current_user_can(access_optimizemember_ccap_mypackage)]
Content for members who are logged in with a required membership level and package.
[/_opmIf]


See below screenshots on how to add these shortcode into your element:

Click the cog icon of the element to launch the Advance Elements Options
cog1.jpg

Add the shortcode start tag on code before row field and the shortcode end tag on the code after row field
cog2.jpg

Here is how the element having the code should look like in the LiveEditor
cog3.jpg

Didn't find an answer to your question? Contact Our Support Team (Submit a ticket)
Was this article helpful?
0 out of 0 found this helpful
Follow

Comments

Other Help Categories:

Get Started Guide

Watch our Ultimate Getting Started guide video

Pre-Sales Questions

Ask questions before purchasing our products

Login Problems

If you're having issues logging into our members hub

Accounts & Billing

Update your billing, request a refund and other accounts help

API Key Issues

Get help with licensing your site and API key issues

Membership Help

Get help creating Membership portals and courses

LiveEditor Help

If you need help using or troubleshooting the LiveEditor

Integrations

Find out about the many integrations possible with OptimizePress

Affiliate Questions

Have questions about promoting OptimizePress

Clubhouse Questions

Questions about our Clubhouse Membership Subscription