Search for answers:
The OptimizePress Support Site Has Moved: Click here to access the new Support site

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.

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.

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.

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.

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

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

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

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


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


Find out about the many integrations possible with OptimizePress

Affiliate Questions

Have questions about promoting OptimizePress

Clubhouse Questions

Questions about our Clubhouse Membership Subscription