By default, Paid Memberships Pro includes a “Renew” link on the member’s “Membership Account” page. You may want to make it easier for your members to renew their membership by creating pages, posts and/or inserting buttons to encourage them to resubscribe. This code recipe allows you to place the pmpro_renew_button shortcode anywhere on your site, which makes the membership renewal process much easier for your members.

Insert a “Renew Membership” button via custom shortcode

The Code Recipe

Adding the Recipe to Your Website

You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method.

Once the code recipe has been added to your site, you can start placing the [pmpro_renew_button] shortcode to generate a green “Renew Membership” button as pictured above.

If the current member viewing the content does not have an active membership level or has a level with no expiration date, the shortcode will not output any content.

You can change the styling of this button by altering the CSS found in between the style tags of the code recipe. You can also comment out the styling altogether to change the button into a link or move the custom CSS for selector .pmpro-renew-button into a stylesheet for PMPro Customizations.

Free Course: Membership Site Development—The Basics

Develop a deeper understanding of membership site development in this beginner-level course. Learn how to make your site work better, save yourself time and money, and improve your site's performance.

Featured Image for Membership Site Development Course: The Basics
Was this article helpful?
YesNo