WordPress shortcodes

Memberful provides some shortcodes to make it easier to use within WordPress posts and pages. You can also click the Memberful editor button in any page or post to add shortcodes automatically.

Memberful editor button

Link for a member to sign in to their account:

[memberful_sign_in_link]Sign in[/memberful_sign_in_link]

Link for a member to sign out of their account:

[memberful_sign_out_link]Sign out[/memberful_sign_out_link]

Link for a member to see their account profile:

[memberful_account_link]Account[/memberful_account_link]

Link to a protected Download:

[memberful_download_link download="123-my-download-slug"]Download[/memberful_download_link]

Link to a member's Private RSS Feed:

[memberful_private_rss_feed_link]Your RSS feed[/memberful_private_rss_feed_link]

Restricting access with shortcodes

We recommend using the restrict access metabox to restrict access to content. If want to protect content directly in a post or page, you can use shortcodes. You'll first need to fetch the integration slug from your Memberful dashboard. The slug is shown at the bottom of the screen when editing a download or subscription plan.

Here's a basic example of requiring a subscription to the Big Awesome plan to see the protected content.

[memberful has_subscription_to="154-big-awesome"]

  Protected content goes here...

[/memberful]

Require the Super Rad download to see the protected content.

[memberful has_download="27-super-rad"]

  Protected content goes here

[/memberful]

Multiple subscription plans or downloads

If you want to specify multiple subscriptions or downloads use a comma separated list. The content will be shown if the customer is subscribed to any of the subscription plans, or owns any of the downloads you specify.

[memberful has_subscription_to="154-big-awesome,277-cool-hair"]

  This will only be visible to members who have either the "Big Awesome" subscription, or the "Cool Hair" subscription.

[/memberful]
[memberful has_download="27-super-rad,59-rock-on"]

  This will only be visible to members who have purchased either the "Super Rad" download, or the "Rock On" download

[/memberful]

Show content to customers who haven't yet purchased

If you want to show potential customers a message encouraging them to subscribe to a plan, use the does_not_have_subscription_to shortcode:

[memberful does_not_have_subscription_to="154-big-awesome"]

  Shown to users who haven't purchased the "Big Awesome" subscription

[/memberful]

Or for a download, use does_not_have_download:

[memberful does_not_have_download="27-super-rad"]

  Shown to users who haven't purchased the "Super Rad" download.

[/memberful]

General

How to

CMS Integrations

Email Newsletters

Discussion Forums

WordPress

Video

API