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 User Email Address:
[opmGet constant="OPTIMIZEMEMBER_CURRENT_USER_EMAIL" /]
Display User First Name:
[opmGet constant="OPTIMIZEMEMBER_CURRENT_USER_FIRST_NAME" /]
Display User Last Name:
[opmGet constant="OPTIMIZEMEMBER_CURRENT_USER_LAST_NAME" /]
Display Current User Login (Username):
[opmGet constant="OPTIMIZEMEMBER_CURRENT_USER_LOGIN" /]
Display Name of logged in member:
[opmGet constant="OPTIMIZEMEMBER_CURRENT_USER_DISPLAY_NAME" /]
Display link to modify Profile:
Display Current User Level
[opmGet constant="OPTIMIZEMEMBER_CURRENT_USER_ACCESS_LABEL" /].
Display Number of times a user has logged into your site:
[opmGet constant="OPTIMIZEMEMBER_CURRENT_USER_LOGIN_COUNTER" /].
Display Current User IP Address:
[opmGet constant="OPTIMIZEMEMBER_CURRENT_USER_IP" /]
Show content only if user is logged in (at any level):
Content for anyone that is logged in, regardless of their Membership Level.
Show content only if user is NOT logged in:
Some public content. They're NOT logged in.
A leading !exclamation means false.
Show content to a specific package (CCAP) (in this example package is called free_gift ):
Display free gift here. This Member has access to a Custom Capability that supplies a free gift.
If you would like to know a good way to use the CCAP shortcodes to show/hide content based on packages, check out our video here: https://optimizepress.zendesk.com/hc/en-us/articles/115001412553-Control-Element-Visibility-With-OptimizeMember-Shortcodes
Show content to user who does not have access to a specific package (CCAP) (in this example package is called free_gift )
This Member or visitor DOES NOT have access to a Custom Capability that supplies a free gift. So you would show them something if the user "doesn't" have access. See note below.
Note: the ! before current_user_can is what makes this happen (it essentially means the current user can't access the package - So if you wanted to show a sales button or other things to users who don't have the free_gift package, you would use this shortcode above for that.
Show content to more than 1 package but not require all of them:
[opmIf current_user_can(access_optimizemember_ccap_package1) OR current_user_can(access_optimizemember_ccap_package2) OR current_user_can(access_optimizemember_ccap_package3) OR current_user_is(administrator)]
this content can be seeing by all 3 packages but customer only needs to have one of them (can also be seen by admin when viewing page which can be nice if you want to see what it looks like)
Protect content and Require Level 1 or above Access:
Some content for Members who are logged in with an optimizeMember Level >= 1.
Show content to public (people not level 1):
Some public content.
Show content ONLY to level 1 users:
Content for Members at exactly Level# 1, on this Blog.
Some premium content for all Level 1 Members.
Display links for music as well.
Display videos as well.
Some public content.
Show EOT date (will show expiration date or next payment date):
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