Add text before the submit and Checkout button on the PMPro checkout page

Do you have something you want members to know about before they click the ‘Submit and Checkout’ button on your checkout page? Use this code recipe to insert some text, HTML or both before the button.


About the Recipe

This code recipe will enable you to add text/HTML immediately before the Submit and Checkout button located on the Paid Memberships Pro Checkout page. This is a great way to add a little bit of important information that you want your soon to be members to know about.

If you are thinking of using this to display your Terms and Conditions to members, please see our default Terms of Service feature found under the Advanced Settings of the plugin.


The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options

Offer members a discounted rate for upgrading to a higher level

Encourage existing members to upgrade to a higher priced level by offering a discount that is unique to them – no discount code required.


About the Recipe

This code recipe was recently developed for one of our Plus Members.  The member was in the process of launching a new membership level and wanted to encourage their current members to make the upgrade to the new membership level by offering a unique discount that can only be seen or used by the current members of their site. The current members would not need to use a discount code to apply for the deal. All they would need to do is select the new membership level and confirm their subscription by checking out of the site.

For those who are looking to simply offer upgrading members the chance to pay the difference between their current and new level, have a look at our Proration Add-On.

Note: This code recipe will not change the amount that is seen on the Membership Level Page of your site and the discounted price will only be seen once on the checkout page. Make sure to communicate this effectively to your members to avoid confusion.

Code Recipe


This code recipe requires a Plus Account or higher.

View Membership Options

Show a Member’s Level Name in Post Comments

When a member posts a comment on your site, the recipe below will display their Membership Level name following the comment author’s name.

This can be useful for many membership sites, specifically sites that have multiple tiers of membership which equate to a member’s status, skill-level or denote a relationship to your company.

The author name is also updated in the Comments section of the admin dashboard so you can tell what membership levels users have when approving pending comments. This has been particularly useful for us on our own site to tell which of our blog post commenters are paying members.

Show member level name next to author name in comment

This page requires a PMPro Core Account or higher.

Already have an account? Login Now »

New to this site? Register Now »

Remove homepage redirect for admins only (PMPro Member Homepages Add On)

Prevent members with the Administrator role from being redirected to a new homepage when using the Member Homepages Add On


About the Recipe

Using the Member Homepages Add On for Paid Memberships Pro allows you to completely redirect logged in members to a home page of your choice based on their membership level.

This code recipe will prevent Administrators with a membership level from being redirected to the new homepage. This can be useful at times when a website admin needs to get access to the ‘public/non-member’ homepage.

This recipe will only work if our Member Homepages Add On is installed and activated on your website.


The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options

Require Membership to Purchase Specific Categories of Products in WooCommerce

Offer special “members-only” products that require the user to have an active membership in order to purchase. The selected products will still appear in your Shop page, but cannot be purchased by non-members.


About the Recipe

This customization recipe allows you to restrict the purchase of products in designated WooCommerce product categories for active members only. You now have full control over which categories require a membership in order to be purchased and which product categories (if any) are available to the public, regardless of their membership status.

This recipe can be used on its own or in conjunction with our WooCommerce Integration Add On, which offers additional features for integrating Paid Memberships Pro with WooCommerce.

Woocommerce product example


Some suggested use cases include:

  1. A shop that offers an array of products, some of which will only relate to members. This can include products like Membership-branded clothing or accessories, access to digital add-on products, specialized meal or diet plans and more. Basically, anything that you only want your members to be able to own and purchase.
  2. A shop that offers unique or special products that can entice users to sign up for a membership in order to purchase. This can be an added incentive to users thinking about signing up for your membership.
PRO TIP: Try to make your membership level/products as easy to sign up for and purchase as possible. A user may feel reluctant to join a membership only to be able to purchase a particular product. This can leave them feeling “forced” into something that they do not want to be a part of.Look at offering a lot of value for your membership packages and rather use this as an “added benefit” instead of a means to purchase a product.


The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options

Display Comments on a Members-Only Post to Non-Members

Give users a little insight into your blog posts by displaying comments to non-members. This can be a great way to provide social proof for your content without exposing it publicly.


Display comments of a Member-Only blog post to Non-Members.

We recently had one of our members ask us to help them with an upsell strategy. This member, in particular, wanted to display the member comments associated with their restricted, members-only blog posts. By default, Paid Memberships Pro will hide the comments and comment form for all posts that require membership.

The idea is when a non-member views a restricted blog post, they are able to see all members-only comments but not the post’s content. Having other members commenting saying things like “Thanks for the article, this really helps!” or “Awesome! This step by step guide was quite useful.”, can really help ignite a non-member’s curiosity and motivate them to subscribe to your product.

This approach can also help display your community’s activity and engagement: another strong selling point to any non-member considering a signup.

Recipe: Default Comments Hidden from Non-Members
Default: Comments are hidden.
Using Recipe, Comments Displayed to Non-Members
After: Comments are displayed.

The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options

Set a Specific Checkout Level When Using Addon Packages

Our Addon packages extension allows you to sell access to individual pages or posts, or sell a la carte items for a flat fee.

This recipe will allow you to set a specific checkout level to use when a non-member selects to purchase one of your Addons. Previously, the plugin simply included logic to select the “first least expensive membership” level assigned to the post.

This page requires a PMPro Core Account or higher.

Already have an account? Login Now »

New to this site? Register Now »

Improve the user experience (and increase signups) when using the Limit Post Views Add On

I recently helped two members in our support forums add some interesting and useful user-experience improvements to their sites. Both members are using the Limit Post Views Add On to give visitors or low-tier members the ability to view a limited number of restricted posts.

Continue reading to see how you can leverage this Add On to create a notification bar with a countdown of post views remaining or trigger the display of a popup using the popular Popup Maker plugin for WordPress.


About the Limit Post Views Add On

This Add On sets a cookie for each visitor to track their views. The plugin’s settings page allows you to set the number of visits per “term” for non-members as well as for each membership level. It will allow visitors or members limited access to view posts they do not already have access to view. Once the user’s view limit is reached, they are redirected to the assigned page (most people select the Membership Levels page).

View the Add On


Notification “Countdown” Bar

This nifty recipe will add a countdown, showing members just how many more post views they are allotted. Once the limit is reached, the user will be redirected as specific in the Add On’s settings.

The Code Recipe: Option 1

This code recipe requires a Plus Account or higher.

View Membership Options


Trigger a Popup when Limit is Reached

This next recipe integrates with the Popup Maker plugin available in the WordPress repository. Once the limit is reached, the user will be redirected to the specified page and the popup will trigger.

You can add any content you would like to this popup, perhaps even try using the [pmpro_signup] shortcode to give users a streamlined way become members. The only important piece for the Popup Maker settings is to set the “Conditions” to show only on the redirected page ID (usually the Membership Levels page).

Limit Post Views - Popup Maker Triggered

This code recipe requires a Plus Account or higher.

View Membership Options

Add the Member’s level ID to the body class for level-specific CSS styles.

The code example below will allow you to add the logged-in member’s level ID (if available) to your site’s body class. This can prove useful if you want to change the style of or even hide elements based on level.


Default Body and Post Classes

WordPress offers several functions that can filtered by plugins to add classes to your site’s body element and posts elements. Below are the default filters Paid Memberships Pro adds to these elements:

Classes already added using the body_class Function

Membership Requirement-related
  • pmpro-body-level-required
    Added if the post requires membership.
  • pmpro-body-has-access
    Added if the logged in user has access to the members-only content.
  • pmpro-body-level-$levelID
    Added for each membership level the post requires.

Plugin Page-related
These classes will be added based on the plugin page settings.
  • pmpro-account
  • pmpro-billing
  • pmpro-cancel
  • pmpro-checkout
  • pmpro-invoice
  • pmpro-levels


The Code Recipe

This code recipe requires a Plus Account or higher.

View Membership Options