Video Walkthrough: How to restrict members-only content in Paid Memberships Pro.

If you’re new to Paid Memberships Pro, you may be wondering what settings are available to restrict access to members-only content on your site. This video extends our documentation on Controlling Members-Only Content and provides a quick tutorial to familiarize yourself with a few methods to lock down your posts, pages, and categories.


Control your content.

Paid Memberships Pro is a WordPress Plugin that allows you to add Membership functionality to your website. One primary application of our plugin is to allow users to signup for a membership level in order to gain access to specific, restricted members-only content.

Once you’ve completed the initial installation and setup, you can begin to restrict your site’s pages, posts and other content. In the video below, I will walk you through the three most common methods of turning your website into a membership site by restricting pages, posts, and hiding specific sections of content using the [membership] shortcode.


Video Walkthrough

 

Memberlite 4.0: Bug Fixes, Improvements, Memberlite Elements, and Upgrade/Migration Steps

We’re excited to announce a new phase in the Memberlite theme lifecycle plus the release of the Memberlite Elements plugin.

Memberlite v4.0

This update prepares Memberlite further for submission to the WordPress.org theme repository. One requirement for this is that some functionality needed to be moved into plugins. Functionality around banners, sidebars, and widgets have been moved into the Memberlite Elements plugin. After upgrading to Memberlite 4.0, you will need to install the new Memberlite Elements plugin. Use the steps below to upgrade Memberlite and install the new required plugin.

As soon as the theme is accepted into the WordPress.org theme repository, we will push out a minor update to tell the theme to update through WordPress.org going forward.

To find out more about Memberlite 4.0, you can now browse the demo site of the entire Memberlite Theme or view full theme documentation at the Memberlite Theme Support Site.

 


Adhering to WordPress theme standards and best practices.

In preparation for the theme’s submission to the WordPress.org Themes Repository we’ve updated the code to fully adhere to WordPress’ standards and guidelines as outlined in the Theme Check plugin. We also purchased a theme review from Justin Tadlock at ThemeReview.co, which prompted additional updates to harden up our code base and make it more reliable and secure for all users.

In Memberlite v3.0 all shortocdes were extracted to a separate plugin: Memberlite Shortcodes. For Memberlite v4.0, some other functionality around banners, sidebars, and widgets have now been moved to a new plugin Memberlite Elements.


Style Updates

Memberlite v4.0 has a few relatively minor, but impactful, style updates.

  • The default font size has been increased for improved readability. This should look fine on most sites, but you may need to tweak some content and styles on your site to get things to fit with the new sizing.
  • We are now including some web safe fonts (Arial, Helvetica, Times, etc.) in addition to the Google Fonts previously available.
  • Font Awesome has been updated to version 5.2, offering new icons and icon styles (regular, solid and brand).
  • Buttons have been given a hover effect to grab the attention of your users.
  • A new [memberlite_accordion] shortcode has been added to Memberlite Shortcodes.
  • Additional theme Hooks and Filters have been added to support individual site customization as well as child theme development.

Already using the Memberlite Theme?

Below are the step-by-step directions for upgrading to the new version and installing the companion Memberlite Shortcodes plugin. Before beginning this process we recommend taking a backup of your WordPress site.

  1. Back up your site files and database [instructions]
  2. Install and activate the Memberlite Elements plugin.
  3. Upgrade your theme via the WordPress Updates admin page, or download the theme and upload it to your /wp-content/themes/ folder.
  4. If you haven’t already, consider installing the Memberlite Shortcodes plugin.
  5. If you are using a caching plugin, delete and rebuild your cache.

PMPro Plus members can get support for this upgrade process via the Members Forum. Just open a topic and we will schedule a time to perform your upgrade.


Learn more about Memberlite 4.0 at the links below.

This entry was posted by Jason Coleman in Memberlite, Release Notes and tagged . Bookmark the permalink. Last updated: . Titled Memberlite 4.0: Bug Fixes, Improvements, Memberlite Elements, and Upgrade/Migration Steps

Choose when to display the Renew link to members who sign up for a membership level with an expiration date.

Use the following code recipe to display a “Renew” link on the Membership Account page at your desired period before a member’s expiration date.

"Renew" link on the PMPro Membership Account Page


About the Code Recipe

By default, when a member signs up for a membership level that has an expiration date, they will see a “Renew” link a certain number of days prior to their membership expiration date. When a member “Renews” their membership, the new period is automatically tacked on to the end of their existing membership level. The core plugin has built-in logic to determine when the “Renew” link appears based on the active member’s billing and expiration date settings.

If the member logs in to their membership account before this timeframe is triggered, they will instead see a “Change” link, allowing them to view current membership level offerings and change their membership level. This code recipe allows you to control exactly when the “Renew” link will appear for the member.


The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options


More about Renewals and PMPro

If you are new to PMPro, check out some of these other articles related to member renewals:

Using Page Builders to Enhance Your Site’s Membership Pages

Page builders are a popular way to create a more visually appealing user experience on your site. Many Paid Memberships Pro users are confused with how to properly use these tools alongside the required shortcodes on various pages of your membership site, such as the pricing page or membership account page.

This post covers how to resolve conflicts between plugin shortcodes and popular page builders such as SiteOrigin Page Builder, Elementor and Beaver Builder.


Ensuring Compatibility

Below are a list of common issues we see when trying to use Paid Memberships Pro with a page builder.

  1. Required page shortcodes don’t render.

    The main issue that we see related to Page Builders is that default page shortcodes, such as [pmpro_levels] or [pmpro_account], don’t render. You’ll know you are experiencing this issue if you go through the Initial Plugin Setup, then click to view your “Membership Pricing” page and see something like this:

    Not all of the Paid Memberships Pro shortcodes will render as actual content when using a live editing experience. I have seen different behavior among all of the builders I tested. The best way to ensure the page is loading properly is to save and publish your content then view the page on the frontend.

    If the shortcode still isn’t rendering, make sure you are using your builder’s standard text or shortcode widget/component/block for the page’s required shortcode. I have seen cases where the builder places your page’s shortcode in a special block type that will not render shortcodes. Here’s a list of all required shortcodes for your Membership pages.

  2. “Live Editors” don’t load or redirect to the “Membership Levels” page.

    This issue is present if you try to edit a page like the “Membership Account” page in a “Live Editor” experience, but the editor redirects you to the Membership Levels page. To resolve this, you must make sure that your administrator account has a membership level. This is due to a conflict where the builder is trying to offer a “preview” of the page, while our membership plugin is trying to restrict your access to these members-only pages. Having a membership level on your administrator account (even you create a hidden, private level that only your Admin account has) resolves this.

  3. Members-only content isn’t protected.

    Because Page Builders rely heavily on their own logic to render page layouts, sometimes the builder’s content filters run later than the Paid Memberships Pro filter. This can result in protected content being public. The solution to this issue has been covered previously in this article, which outlines how to run the Paid Memberships Pro content filters with a higher priority (after the builder has done its content-formatting magic).

    Alternately, you can use this method to redirect non-members away from members-only content. This completely bypasses the need to filter members-only content and is the most straightforward approach to tackling this issue.

  4. “Live Editor” on the checkout page doesn’t load.

    The Membership Checkout page relies on a level ID being passed through the URL (usually from the Membership Levels page) in order to display the appropriate level details at checkout. When using a live preview or editor experience, there is no level ID passed in the URL so the page either fails to load or redirects to the Membership Levels page. You can resolve this by adding a Custom Field with the key or name pmpro_default_level and value of any valid level ID. This allows the “Live Editor” to locate a level for the preview page. Now your Membership Checkout page’s live editor can draw in some level’s content and allow the preview.

  5. I don’t see the “Restrict Membership” box on the editor.

    If your page builder uses a live editing format, chances are that the “Restrict Membership” metabox is not part of this editing experience. After you have made your page design and content changes via your builder’s editor, you will need to also edit the post with the WordPress editor and select the appropriate membership levels to restrict access. Read this guide for more help on restricting content using Paid Memberships Pro.

All of the above issues have a solution, so please don’t panic. We are looking for ways to build support into our plugin for popular open source page builders. For now, we’ve tested Paid Memberships Pro compatibility with the list of Page Builders below. These were tested on a fresh WordPress site with only the core Paid Memberships Pro plugin, the Twenty Sixteen WordPress Theme and using only that specific Page Builder. If you are using another open source page builder, please post a comment below and we will test which combination of solutions are needed to make the two plugins compatible.


Page Builder by SiteOrigin

Page Builder Info: WordPress Repository | Widgets Bundle | Website

This builder is one of the most popular open source builders available via the WordPress.org Repository. In my testing, I have found that you need to modify a few of the ways our core plugin renders content in order to ensure compatibility with SiteOrigin’s builder. The code recipe below should be included in a plugin for PMPro Customizations.

In this recipe, we are removing some content filters we add to your site’s level descriptions and confirmation messages, as they were causing issues when the builder attempted to render the membership checkout and confirmation page shortcodes.

When editing the Membership Checkout page, you must set a Custom Field on the Membership Checkout page with the key pmpro_default_level and value of any valid level ID. This allows the “Live Editor” to locate a level for the preview page.

You must also make sure that your administrator account has a membership level in order to use the “Live Editor” experience. This is due to the fact that the Page Builder by SiteOrigin editor is trying to offer you a “preview” of the page, while our membership plugin is trying to restrict your access to these members-only pages. Having a membership level on your administrator account (even you create a hidden, private level that only your Admin account has) resolves this.


Elementor

Page Builder Info: WordPress Repository | Website

This builder is gaining popularity very quickly and its easy to see why. Because Elementor is a drag & drop live editor, there are some special considerations you need to make specifically when attempting to use the builder to edit your Membership Checkout page. When editing the Membership Checkout page, you must set a Custom Field on the Membership Checkout page with the key pmpro_default_level and value of any valid level ID. This allows the live preview editor to locate a level for the preview page. This step must be done before you convert to editing the page with the live preview.

You must also make sure that your administrator account has a membership level in order to use the “Edit with Elementor” experience. This is due to the fact that the Elementor editor is trying to offer you a “preview” of the page, while our membership plugin is trying to restrict your access to these members-only pages. Having a membership level on your administrator account (even you create a hidden, private level that only your Admin account has) resolves this.

You must also add a custom code recipe that filters your content later as well as removes the default content filters our plugin uses on your site’s level description and confirmation messages. The code recipe below should be included in a plugin for PMPro Customizations.


Beaver Builder

Page Builder Info: WordPress Repository | Website

Beaver Builder offers a live editing experience for WordPress and premium versions offer pre-built templates and layouts which make it simple to design well thought out content. In my testing it was one of the most intuitive builders in this list. There are a few steps to take to ensure compatibility with Beaver Builder. The code recipe below should be included in a plugin for PMPro Customizations.

When editing the Membership Checkout page, you must first set a Custom Field with the key pmpro_default_level and value of any valid level ID. This step must be done before you convert to editing the page with Beaver Builder. This allows the live preview editor to locate a level for the preview page.

You must also make sure that your administrator account has a membership level in order to use the live editor experience. This is due to the fact that the Beaver Builder editor is trying to offer you a “preview” of the page, while our membership plugin is trying to restrict your access to these members-only pages. Having a membership level on your administrator account (even you create a hidden, private level that only your Admin account has) resolves this.

You must also add a custom code recipe that filters your content later. This allows Beaver Builder to process all the layout-related filters on your content, then allows Paid Memberships Pro to apply appropriate membership restrictions. The code recipe below should be included in a plugin for PMPro Customizations.


More about Page Builder Compatibility

I have also seen some funny behavior specifically if you had generated the PMPro pages prior to activating the Page Builder. If your builder isn’t playing nicely with our shortcodes, try to open the page in the builder’s editor then save the page. For some reason this occasionally resolves the issue and then your shortcode will render.

  1. Edit each Page under Memberships > Page Settings.
  2. Swap to your builder’s rich page editing experience.
  3. Make sure the appropriate page’s shortcode is in the editor.
  4. Save the page.

Using another Page Builder?

If we didn’t cover the builder you are using or if you have Page Builder-like features as part of your theme, post a comment below and we will try to test it and work out a solution. We are only able to offer compatibility testing if the builder you are using is also open source, like Paid Memberships Pro and the page builders mentioned in this post.

Add On Updates for July 2018

This post recaps the Paid Memberships Pro Add Ons recently updated. Plus or Unlimited members can upgrade through their WordPress dashboard under Dashboard > Updates or Memberships > Add Ons. Be sure to backup your site before performing updates.


BuddyPress Integration Add On

BuddyPress Integration

Our BuddyPress Integration Add On allows you to manage access to your BuddyPress Community using Paid Memberships Pro. v1.1 and v1.1.1 resolve several bugs and offer enhancements as listed below:

  • BUG FIX: Fixed fatal errors when PMPro or BuddyPress isn’t activated.
  • BUG FIX: Fixed bug where membership level changes were creatinig fatal errors if Groups was not active.
  • BUG FIX: Fixed bug where the members directory was not being filtered correctly.
  • BUG FIX: Fixed bug where logged in users were being redirected to the BuddyPress registration page even though logged in users can’t register.
  • ENHANCEMENT: Doublechecking pmpro_hasMembershipLevel so plugins like PMPro Approvals can still filter which levels are included when calculating restrictions.

View the Add On


Capture Name and Address

Capture Name and Address for Free Levels

If you’d like to capture the member’s name and address fields for a free membership level or if you are using an offsite payment gateway, check out this Add On.

v.3.3 fixes an issue where name fields weren’t updating WordPress when PayPal Express was used.

View the Add On


Custom Post Type Membership Access

Custom Post Type Membership Access

This Add On adds the ‘Require Membership’ meta box to all CPTs selected and redirects non-members to the selected page.

v.2.1 of the Add On fixes a bug with redirects when no CPTs were selected on the settings page but the is_singular check was still returning true. This resulted in ALL single content posts and pages being redirected.

View the Add On


Group Discount Codes

This plugin will help to manage grouped discount codes or large numbers of unique discount codes with the same pricing.

v.3.1 and v.3.2 of the plugin add features related to viewing individual group code activity. The release adds a “Group Code Uses” column to the Memberships > Discount Codes page. This column will now show a sum of child codes that have been used. The release also adds a “Group Code” column to the Memberships > Orders CSV export.

View the Add On


Subscription Delays

Subscription Delays

This Add On adds a “delay” field to membership levels and discount codes, allowing you to set a variable-length period between your initial payment (if required) and recurring subscription payment.

v.4.6 of the Add On fixes a bug where an invalid startdate was returned from pmpro_profile_start_date filter handler. This resulted in double payments at checkout for levels that had no subscription delay set.

View the Add On


WooCommerce Integration

This plugin aggregates several features for integrating your Membership site with WooCommerce to sell Memberships as a product, set a global % discount on products by level or set a per-product members-only price. Several updates have been made to the Add On through v1.6.1, including:

  • BUG FIX: Fixed fatal error in pmprowoo_get_membership_products_from_order() that was happening on some systems.
  • ENHANCEMENT: Localization/GlotPress support.
  • BUG FIX: Fixed bug when deselecting the autocomplete option on a membership product.
  • BUG FIX: Now checking if a user has a different subscription linked to their membership level before removing a user’s membership level. Users switching between subscriptions for the same level would have their level removed. (Thanks, Ted Barnett)
  • BUG FIX: Fixed issues when a product with a sale price also has membership pricing.
  • BUG FIX/ENHANCEMENT: Updated to work with the latest versions of WooCommerce (3.4.2) and WooCommerce Subscriptions (2.2.22).
  • ENHANCEMENT: Added a filter pmprowoo_get_membership_price, which can be used to support variable products via custom code (like this)
  • ENHANCEMENT: Added support for PMPro Multiple Memberships per User.

View the Add On

Restrict Checkout for Users with a History of Refunds

Let’s face it, dealing with refunds is an unavoidable part of your membership business. Some number of your refunds will be from legitimate users that realize they do not need or want your membership any more.

Some refunds, though, may be from abusive users who know that they can sign up, consume your membership product (whether that’s support, premium content or guides, downloads and more), then cancel and request a refund right away. If you are seeing this become a widespread problem, check out the code recipes below.


About the Code Recipe

This post includes three different recipes based on how you want to approach the restriction on a new checkout. In each case, the user will see a notice if they try to purchase membership that can be adjusted for your needs. The default message reads: Please contact us about your account to complete checkout..

  1. Restrict checkout if the LAST order was refunded,
  2. Restrict checkout if the user has ANY refunded order history,
  3. Restrict checkout if the user has ANY refunded order history, but ALLOW checkout if their LAST order was successful.

This code recipe requires a Plus Account or higher.

View Membership Options


More about Refunds and PMPro

If you are new to PMPro, check out some of these other articles related to member refunds:

Include the used and claimed Group Discount Codes in your Membership Orders export file

This recipe was so useful that we merged it into the Group Discount Codes Add On. When the Add On is activated, a “Group Code” column is added to the CSV export showing the Group Code that was used at checkout (if applicable). The regular Discount Code column will show the main/parent discount code.

You can grab the Group Discount Codes Add On that includes this feature here. If you are interested in how this works to possibly do something similar via custom code, we’ve kept the original code recipe here for reference.


About the Code Recipe

The Group Discount Codes Add On for Paid Memberships Pro allows you to see the number of times the ‘parent’ discount code was used on the Memberships > Discount Codes admin page. However, you might want to know which individual ‘child’ group discount codes have been used and by whom.

If you’re new to the Group Discount Codes Add On, it adds features to PMPro to better manage large numbers of unique discount codes with the same pricing. For example, it can be used to create a group of codes to print on promotional material, for use in a campaign with Groupon or for an email campaign.

You can use the following code recipe to add an extra CSV column called group_code to your Orders CSV download file. Inside of this new column, you will be able to see which individual group codes have been used and by which member. To access and download your Orders CSV file, navigate to your WordPress Dashboard > Memberships > Orders > Export to CSV.

We are currently working on better reports for Discount Codes in the core Paid Memberships Pro plugin as well as specialized reports for viewing activity on your Group Discount Codes. This code recipe will help membership sites already using the Group Discount Codes Add On to have better visibility of code uses. is already merged into the Add On, but you can view the code recipe below for reference. Let us know if you have any other ideas for this Add On or discount codes in general.


The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options

Recent updates to the Theme My Login plugin and how they will affect your membership site.

We have long recommended Theme My Login as a very useful plugin for sites running Paid Memberships Pro. With features including themed login, frontend user profiles, and simple redirection rules, we found TML to be a great addition for any membership site. We recommended it to 100% of our users and included it in our WordPress bundle.

With the release of version 7.0+ of Theme My Login, several key features that were once included in the WordPress.org repository version of the plugin are now offered as premium extensions. This post details some short and long term options for membership site owners concerned about the changes and the best steps to take.


Themed login pages are still part of the free plugin.

If you were only using Theme My Login to show your login form on the frontend of your website and not using any of the “modules” that came with the plugin, then you are fine and can continue to use Theme My Login as you were before. Make sure that you are upgraded to the latest version of Paid Memberships Pro as well, which included a fix so PMPro will still redirect the registration page to the PMPro levels page and handle login redirects properly.


If you can afford it, purchase the Theme My Login extensions bundle after upgrading.

Theme My Login is a solid plugin maintained by a great developer, Jeff Farthing. Support Jeff and your site by purchasing the premium extensions you need.

Currently you can purchase extensions a la carte for $10 each or a bundle of all 6 legacy extensions for $49.99. Jeff has kindly given us a discount code to share with our members to receive 20% off any extension purchase, including the bundle. Just type in “PMPRO” on the checkout page to apply the 20% discount. This code will work through the end of July 2018.

You can purchase the Theme My Login extensions here.


After upgrading you may have to redo some settings.

We purchased the bundle ourselves and were able to get our themed login and profile pages back online in a few minutes. We did have to redo a few of the settings though. Here are a few notes we took during the upgrade that might help:

  1. When we installed the Redirections extension, all of our redirection rules all migrated properly upon upgrade.
  2. When we installed the Themed Profiles extension, our settings were reset to the default. We typically recommend checking the box to theme profiles for the Subscriber role and checking the box to keep Subscribers out of the dashboard.
  3. The default Login, Register, Password Reset, and Profile pages are no longer editable as pages. However, we were able to take our “your-profile” page, keep the [theme-my-login] shortcode on the page, and then change the slug in the main TML settings to “your-profile”. Now the profile page has the template, sidebar, and other settings we want for that page.

The PMPro Member Homepages add on is a good substitute for the TML login redirect module.

One of the TML modules allowed you to select a different page to be redirected to after logging in based on the user’s role. This way you could have subscribers redirected to one page and admins redirected to another.

If you don’t need to redirect users based on roles, you can redirect them based on their membership level instead using our Member Homepages add on.

In the short term, you can keep using version 6.4 of TML

While its always smart to keep your WordPress plugins up to date for security considerations, in the short term you can keep version 6.4 of TML active. The plugin won’t allow you to update in the WP dashboard unless you read the notice on the settings page and change a setting to approve the upgrade to version 7.0.

Version 6.4 TML is likely to work for a while until a core update to WordPress changes something about the login system that breaks it. We highly recommend upgrading to TML 7.0+ as soon as possible, but you have some time to figure things out.


Improving Paid Memberships Pro with Added Profile Features

The new business model for Theme My Login is a good move for Jeff and will help him to build a business around the plugin that will ensure the plugin continues to be maintained and supported. We like plugins that do their one thing really well, and we’ve been happy with Theme My Login over the years. I’d rather not use our limited development time to build functionality covered by other competent plugins. On the other hand, the cost of the extensions are going to keep some PMPro users from installing Theme My Login. This factors into our decisions around what features we build into the core PMPro plugin, build into our Add Ons, or reserve for third party plugins.

In the long term, we are looking into moving the themed login and profile page features into the core PMPro plugin or possibly an Add On of our own. We are in the early stages of discussion and will start from first principles to figure out what kind of solution will be best for our users.

In the short term, you can purchase the extensions you need using the PMPro discount code, use some of the workarounds mentioned in this post, or continue to use TML 6.4 until a core WordPress update breaks the plugin.

PMPro Updates 1.9.5.2 and 1.9.5.3

Versions 1.9.5.2 and 1.9.5.3 of Paid Memberships Pro are out with just two bug fixes. Version 1.9.5.2 fixes compatibility with Theme My Login. Version 1.9.5.3 fixes an issue (we tried and failed to fix in 1.9.5.2) where existing members who checked out for their same level with PayPal Standard would have their levels expire from the checkout date instead of being extended based on their existing level.


Please update Paid Memberships Pro from the plugins page of your WordPress dashboard. You can also get the latest version of PMPro here or version 1.9.5.3 specifically here.


The full list of updates is below.

1.9.5.3

  • BUG FIX: The pmpro_ipnhandler_extend_memberships function actually needed use $user_id instead of $current_user.

1.9.5.2

  • BUG FIX: Fixed compatibility with Theme My Login version 7. (Thanks, Jeff Farthing)
  • BUG FIX: Fixed missing $current_user bug in pmpro_ipnhandler_level_extend_memberships function. (Thanks, Anne)