Skip to content
GPLWP Guides

How to restrict custom content by membership level on WordPress

Membership & LMS Time About 30–60 minutes 6 steps Updated 9 Oct 2026

MEMBERSHIP & LMS
The short answer

WordPress cannot restrict custom post types by membership level on its own. You need either custom code connected to a membership system or a membership plugin with custom post type rules. For most sites, Paid Memberships Pro is the faster option.

The route
  1. 01List the content and levels
  2. 02Understand the manual route
  3. 03Choose the protection scope
  4. 04Install the access system
  5. 05Assign each level
  6. 06Test every access path

What you need

  • A WordPress site with the custom post type already registered
  • Administrator access
  • Defined membership levels and the content each level should access
  • A staging site or recent backup

List the content and levels

Write down the custom post types that need protection, such as lessons, courses, events or case studies. Decide whether each item should be public, available to one level, or available to several levels.

Also decide what visitors without access should see: a login message, an excerpt, or a redirect to your membership page. These are different behaviours and should not be treated as the same rule.

Understand the manual route

WordPress core has no concept of membership levels. A manual solution therefore needs a membership system that stores the user’s level, plus custom code that checks that level before a protected custom post type is displayed.

The usual structure is a small custom plugin that runs before the template loads, checks whether the request is for a protected custom post type, checks the logged-in user’s membership through the membership system’s documented API, and then allows the request or redirects it. WordPress’s template_redirect action is designed for this stage of a request. Do not only hide the content in the template. Direct URLs, archives, search results, REST responses and custom fields can still expose information.

Choose the protection scope

Decide whether access applies to individual custom posts, every item in a post type, or both. Individual rules are useful when courses or resources have different levels. A post-type-wide rule is easier to maintain when every item follows the same membership policy.

Check archive pages, related-content widgets, search results, REST endpoints and feeds separately. A rule on a single custom post type item may not automatically hide its archive or every custom template that displays its fields.

Install the access system

For the faster route, install and activate Paid Memberships Pro, then add its Custom Post Type Membership Access Add On. The add-on is needed because standard membership restrictions do not automatically cover content that is not a normal post, page or category.

Use the WordPress admin area to open Memberships > CPT Access. Select the custom post types that should support membership protection and save the settings.

Assign each level

Edit a protected custom post. The add-on adds a Require Membership panel to enabled custom post types. Select the membership levels that may view that item, then update the post.

Use the optional redirect setting when visitors should be sent to a membership or pricing page. Otherwise, visitors who lack access receive the configured restriction message or protected-content response.

Test every access path

Test the content while logged out, while logged in with each membership level, and as an administrator. Open the direct URL rather than relying on a menu link, then check the custom post type archive, WordPress search, related-content blocks and any LMS templates.

A common Friday-afternoon failure is that the post body is hidden but custom fields, course metadata or a theme-built template still displays premium information. If that happens, use the redirect behaviour or add separate checks to the template and data output. The official documentation also warns that protecting an individual custom post does not necessarily hide it from archives, search or custom templates.

The fast route

Let Paid Memberships Pro do it

Adds level-based access rules for unlimited custom post types; choose it when member restrictions extend beyond standard posts and pages.

Get Paid Memberships Pro

Sources

  1. developer.wordpress.org /reference/functions/current_user_can/?utm_source=openai
  2. paidmembershipspro.com /add-ons/custom-post-type-membership-access/?utm_source=open…
  3. paidmembershipspro.com /documentation/content-controls/?utm_source=openai

Questions

Can WordPress restrict custom post types without a plugin?
Not by membership level using WordPress core alone. You would need to build or already have a membership system that records each user’s level, then write custom code to check that level before displaying the custom post type. The code must also account for archives, search, REST responses and custom fields, so this is a development task rather than a single WordPress setting.
Can I restrict an entire custom post type at once?
Yes, if your membership system supports post-type-wide rules. Configure the custom post type as protected, then apply the appropriate level rules to its items or content type. Check the result on archives and custom templates because some systems protect single items without automatically removing every archive or search result.
Will restricting the post hide custom fields too?
Not always. A membership rule may hide the main post content while a theme or plugin continues to print custom fields, lesson metadata, downloads or structured data. Test the complete front-end template, not just the editor content. If private data is still visible, redirect visitors before the template loads or add access checks around the affected output.
Should I show an excerpt or redirect non-members?
Show an excerpt when the content can safely act as a preview and does not reveal private information. Redirect when custom fields, structured data, downloads or a custom template could expose the protected material. A redirect can also stop search engines from indexing the protected custom post type, but it removes the public preview.
Is Paid Memberships Pro suitable for custom post type restrictions?
Yes. Paid Memberships Pro has a Custom Post Type Membership Access Add On that lets you select protected custom post types, assign required membership levels to individual items and optionally redirect visitors without access. It is a practical choice when restrictions cover courses, events, case studies, products or other custom content rather than only standard posts and pages.