Version 2.3+ of Paid Memberships Pro has a setting to block WordPress dashboard access for the “Subscriber” role. If you are using the Roles for Membership Levels Add On or other custom code to adjust member roles, you can use the pmpro_block_dashboard filter to block the dashboard for additional roles.

How to Block Dashboard Access for Additional User Roles

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.

Update the array on line 15 to block the dashboard for your custom (or Core WordPress) roles. This recipe is designed to be used in combination with the Roles for Membership Levels Add On.


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