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

Shortcodes / Merge Codes to Add functionality to your Membership site

These shortcodes can be used in the HTML/Shortcode element inside the OptimizePress LiveEditor or in the advanced element options to be placed before/after an element


Display Username of logged in member:

[opmGet constant="OPTIMIZEMEMBER_CURRENT_USER_DISPLAY_NAME" /]


Display link to modify Profile:

[optimizeMember-Profile /]


Display Current User IP Address:

[opmGet constant="OPTIMIZEMEMBER_CURRENT_USER_IP" /]


Show content only if user is logged in (at any level):

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


Show content only if user is NOT logged in:

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


Show content to a specific package (CCAP) (in this example package is called free_gift ):

[opmIf current_user_can(access_optimizemember_ccap_free_gift)]
 Display free gift here. This Member has access to a Custom Capability that supplies a free gift.
[/opmIf]


Protect content and Require Level 1 or above Access:

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


Show content to public (people not level 1):

[opmIf !current_user_can(access_optimizemember_level1)]
 Some public content.
[/opmIf]


Show content ONLY to level 1 users:

[opmIf current_user_is(optimizemember_level1)]
 Content for Members at exactly Level# 1, on this Blog.
[/opmIf]


Nested permissions:

[opmIf current_user_can(access_optimizemember_level1)]

 Some premium content for all Level 1 Members.

 [_opmIf current_user_can(access_optimizemember_ccap_music)]
 Display links for music as well.
 [/_opmIf]

 [_opmIf current_user_can(access_optimizemember_ccap_videos)]
 Display videos as well.
 [/_opmIf]

[/opmIf]

[opmIf !current_user_can(access_optimizemember_level1)]
 Some public content.
[/opmIf]


Open link in new window for profile modification (popup):
http://optimizepress2.com/?optimizemember_profile=1', '_popup', 'width=600,height=400,left=100,screenX=100,top=100,screenY=100,location=0,menubar=0,toolbar=0,status=0,scrollbars=1,resizable=1'); return false;">Modify Profile
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