Are you managing a membership site and want to easily browse its entire content without restrictions? Setting up a hidden “super level” with full access can help site administrators streamline their work. Here’s how you can achieve this using a simple code recipe.

Banner for Advanced Code Recipe Tutorial for Paid Memberships Pro

Why a Super Level?

Paid Memberships Pro is designed to limit access based on a user’s membership level—even for administrators. While this structure ensures a consistent user experience for all logged in user, it can be challenging for site owners who need to review content across all levels.

By creating a “super level,” you can grant full access to specific administrator accounts, making content management effortless.

How This Code Recipe Works

Paid Memberships Pro includes various functions to control whether the current user or site visitor can access your posts, pages, categories, sections, blocks, and more. However you have your content protections configured, all of the final logic is run through a single content filter: the pmpro_has_membership_access_filter.

This code recipe has logic to check the level ID of the current logged in user. If that level ID is the all access/hidden level, then the code will always return true (the user has access to the content).

Steps to Create and Assign a “Super Level”

First, Create the Membership Level

  1. Go to Memberships > Settings > Levels in the WordPress admin.
  2. Click the Add New Level button.
  3. Name the level something like “Hidden Super Admin Level.”
  4. In the Other Settings section, check the box to hide the level and do not allow signups.
  5. Save the level.

Then, Assign the Level to Yourself or Another Admin

  1. Navigate to Users > All Users in the WordPress admin.
  2. Select the user you want to grant the super level to and click Edit Member.
  3. On the Memberships panel assign the “Hidden Super Admin Level” to the user.
  4. Save changes.

Now that your level is in place, you are ready to add the code recipe below to your site. This code will always allow access for members of your hidden level.

The Code Recipe

/*
Give level 1 members access to everything.
Add this to your active theme's functions.php or a custom plugin.
*/
function my_pmpro_has_membership_access_filter($access, $post, $user)
{
if(!empty($user->membership_level) && $user->membership_level->ID == 1)
return true; //level 1 ALWAYS has access
return $access;
}
add_filter("pmpro_has_membership_access_filter", "my_pmpro_has_membership_access_filter", 10, 3);

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.

Modify the level ID in the code recipe (line 7) to your hidden level’s ID.

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