Shortcodes

[s2Member-List show_fields=\“s2member_access_label\“ /]

[s2Member-List show_fields=\“Membership Level:s2member_access_label,Expiration Date:s2member_auto_eot_time\“ /]

[s2Get user_field=\“s2member_access_label\“ /]

[s2Get user_field=\“user_login\“ /] # Username for the current User.

[s2Get user_field=\“user_email\“ /] # Email Address for the current User.

[s2Get user_field=\“first_name\“ /] # First Name for the current User.

[s2Get user_field=\“last_name\“ /] # Last Name for the current User.

[s2Get user_field=\“full_name\“ /] # First and Last Name for the current User.

[s2Get user_field=\“display_name\“ /] # Display Name for the current User.

[s2Get user_field=\“avatar\“ size=\“96\“ /] # Avatar <img> tag.

Practical Shortcode Equivalents Using [s2Get /]

[s2Get user_field=\“s2member_custom\“ /] # Custom String value for the current User.

[s2Get user_field=\“s2member_subscr_id\“ /] # Paid Subscr. ID for the current User.

[s2Get user_field=\“s2member_subscr_or_wp_id\“ /] # Paid Subscr. ID, else WordPress® User ID.

[s2Get user_field=\“s2member_subscr_gateway\“ /] # Paid Subscr. Gateway Code for the current User.

[s2Get user_field=\“s2member_registration_ip\“ /] # IP Address the current User had during registration.

[s2Get user_field=\“s2member_auto_eot_time\“ date_format=\“M jS, Y, g:i a T\“ /] # Auto EOT-Time for the current User (when applicable). Use date_format=\“\“ with any PHP date formatting chars you like. If you don\’t pass this, a timestamp is given instead. See: http://php.net/manual/en/function.date.php

[s2Get user_field=\“s2member_last_payment_time\“ date_format=\“M jS, Y, g:i a T\“ /] # Timestamp. Last time an actual payment was received by s2Member. Use date_format=\“\“ with any PHP date formatting chars you like. If you don\’t pass this, a timestamp is given instead. See: http://php.net/manual/en/function.date.php

[s2Get user_field=\“s2member_access_role\“ /] # A WordPress® Role ID (i.e. s2member_level[0-9]+, administrator, editor, author, contributor, subscriber).

[s2Get user_field=\“s2member_access_level\“ /] # An s2Member Membership Access Level number.

[s2Get user_field=\“s2member_access_label\“ /] # An s2Member Membership Access Label (i.e. Bronze, Gold, Silver, Platinum, or whatever is configured).

[s2Get user_field=\“s2member_login_counter\“ /] # Number of times the User has logged into your site.

Example [s2MOP /] Shortcode

The easiest way to use the s2MOP Shortcode

This goes at the top of your Membership Options Page, using the WordPress editor.

[s2MOP]You attempted to access members-only content.[/s2MOP]

NOTE: the message you define is only displayed on your Membership Options Page if s2Member’s MOP Vars are present; i.e., when a visitor is redirected to your Membership Options Page after they attempted to access content they were not allowed to see.

A Few More [s2MOP /] Examples

[s2MOP]You were trying to access a protected: %%SEEKING_TYPE%%[/s2MOP]

[s2MOP]You were trying to access content that requires a %%REQUIRED_TYPE%% that you don\’t have.[/s2MOP]

[s2MOP]You were trying to access content protected via %%RESTRICTION_TYPE%% restrictions[/s2MOP]

[s2MOP seeking_type=\“post\“ required_type=\“level\“ restriction_type=\“post\“]You were trying to access a restricted post with Post ID %%SEEKING_POST_ID%% which requires that you be a Member at Level #%%REQUIRED_LEVEL%%[/s2MOP]

[s2MOP required_type=\“level\“]\“%%POST_TITLE%%\“ is a protected %%SEEKING_TYPE%% that requires Membership Level %%REQUIRED_LEVEL%%[/s2MOP]

[s2MOP required_type=\“level\“ required_value=\“0|1\“]You were trying to access a Post that requires Level <code>0</code> or <code>1</code>[/s2MOP]

in [s2MOP required_type=\“ccap\“ required_value=\“free_gift\“]This content required a Custom Capability called <code>free_gift</code>[/s2MOP]

[s2MOP /] Shortcode Documentation
de_DE_formalDeutsch (Sie)
Nach oben scrollen