TUTORIAL

How to Restrict Content in WordPress by Role & Login Status

Last Updated: 9 mins By: Rabin Shrestha

Do you want to hide certain pages, posts, or sections of your WordPress site from people who aren’t logged in? Most guides only cover one method: role-based permissions.

They skip the free option built into every membership plan. They also skip the newer block-level and rule-based tools that replaced the old shortcode approach.

In this guide, I’ll walk through every way to restrict content in WordPress. You’ll see which one fits your situation, from a free per-membership setting to Pro’s rule-based Content Restriction.

I’m using User Registration & Membership for every method below. It’s the one plugin I found that handles role-based, login-based, and paid-membership restriction from a single settings screen.

You’re not stitching together three separate tools to cover three separate cases.


What You’ll Need

  • WordPress, with User Registration & Membership installed and active. The free version covers the basics below.
  • The Content Restriction addon for the Pro methods (role rules, login-status rules, and the block-level restriction). It’s included from the Personal plan up.
  • A payment gateway addon, only if you’re restricting content to paying members — PayPal from Personal, Stripe/Authorize.net/Mollie from Plus.

Let’s get started!


What You Can Restrict with User Registration & Membership plugin

Its content restriction feature covers six distinct restriction types. Each one solves a different problem, and each sits on a different plan.

Restriction TypeExample Use CasePlan Required
Logged-in / logged-out statusGate a guide behind free registration to build your listPersonal and up
By user roleGive Subscribers a preview and Premium Members the full articlePersonal and up
Whole site, a page, or a postKeep a staging site or an employee-only page privateFree (per membership’s Access tab) or Personal and up (as a standalone rule)
A section within a page (block-level)Show a free intro, then lock the “premium” section further downPersonal and up
Paying members onlyPaywall a course or article behind a paid membership planFree to create the plan; a payment gateway addon (PayPal from Personal, Stripe/Authorize.net/Mollie from Plus) to charge for it
Other conditions (email domain, registration date, join-date window)Restrict a portal to @yourcompany.com email addresses, or to members who joined before a cutoffPersonal and up

The free version handles the basics. Every membership plan, even a free one, has its own Access setting. It can restrict an entire site, a specific page, or a specific post to that plan’s members.

What free doesn’t have is a standalone rules screen. You can’t restrict by role or login status on their own, and you can’t restrict a single section of a page.

The Content Restriction addon adds a dedicated Content Rules screen, available from the Personal plan. It covers role, login-status, and other conditions, plus a block-level Content Restriction Block for partial page restriction.

Creating a paid membership plan itself doesn’t need any addon. Getting paid for it does. PayPal needs the Personal plan’s payment addon; Stripe, Authorize.net, and Mollie need Plus.


How to Restrict Content in WordPress with User Registration & Membership

Our Setup

I tested every method below hands-on, on September 18, 2026. Here’s the exact environment:

SoftwareVersion
WordPress7.1.1
ThemeMember Read 1.0.3
PluginUser Registration & Membership (Pro) 6.2.5
PHP8.2.29
MySQL8.4.0
Web servernginx 1.26.1

Menu labels and settings panels can shift slightly between versions. If something looks different on your install, the underlying steps should still be the same.

This section assumes the plugin is already installed and activated on your site. If it isn’t yet, follow our guide to installing and setting up User Registration & Membership first, then come back here.


Restrict Access via Membership Settings (Free)

Go to User Registration & Membership → Memberships → Add New. Give the plan a name and pick a type: Free, One-Time Payment, or Subscription Based.

Then move to the Access step.

User Registration & Membership new membership plan Basics tab showing Free, One-Time Payment, and Subscription Based type options

Click + Content and choose what this plan’s members can see: the whole site, specific pages, specific posts, a post type, menu items, or a taxonomy.

Publish the plan. The restriction applies to anyone who isn’t on it.

User Registration & Membership membership plan Access tab with a Content picker for Whole Site, Pages, Posts, Post Type, Menu Items, and Taxonomy

This covers whole-site, whole-page, and whole-post restriction well, tied to a membership plan. It doesn’t cover partial sections or standalone role/login conditions with no membership involved.

That’s what the Content Rules addon below adds.


Build a Content Rule by Role, Login Status, or Other Conditions (Pro)

First, activate the addon: go to Addons, find Content Restriction, and switch it on. A new Content Rules menu appears in the sidebar once it’s active.

User Registration & Membership Content Rules screen showing the empty rules list and Add New button

Open Content Rules → Add New and name the rule.

User Registration & Membership Add New Content Rule dialog with a name field

Click + Condition to pick what should trigger the rule. The main ones are:

  • Login Status: logged in or out, regardless of role or plan
  • Roles: any WordPress role, including custom ones
  • User Registered Date and Registration Period
  • Email Domain
  • A few narrower ones: Min. Public Posts, Capabilities, Registration Source, and URM Form Field

Set the condition’s value. Choose whether it should Access (grant) or Restrict (deny) the content. Then click + Content to pick the whole site, specific pages, posts, a post type, menu items, or a taxonomy.

You can stack more than one condition on the same rule. Save when you’re done.

User Registration & Membership Content Rule with Login Status and Roles conditions stacked, set to Access the Whole Site

Switch to the rule’s Settings tab to control what happens when the condition matches. Pick an action, then choose the global restriction message or write a custom one.

User Registration & Membership Content Rule Settings tab with Action, Restriction Message, and Advanced Logic options

Give a Subscriber role read access to your archive. Add a second rule granting a Premium Member role access to a members-only category. Neither one needs a paid plan to work.


Restrict a Section Within a Page with the Content Restriction Block (Pro)

Everything above restricts a whole page or post. If you want a free introduction followed by a locked section, you need a different tool: the Content Restriction block, included with the same Content Restriction addon.

Open the page in the block editor. Click the + inserter and search for “Content Restriction.”

WordPress block inserter search results showing the Content Restriction block

Drop the block in wherever the locked section should start. Place your restricted content inside it.

In the block’s settings panel, set Select Access Control to Access or Restrict. Then choose who it applies to under Allow Access To: All Logged In Users, Choose Specific Roles, or Guest Users.

Anyone who doesn’t meet the condition sees your restriction message instead of the block’s content. Everything outside the block stays visible to everyone.

User Registration & Membership Content Restriction block settings panel with Select Access Control and Allow Access To options

This is the classic partial-preview pattern. A free excerpt up top, with the rest locked in place, no separate page needed.


Restrict to Paying Members Only

Creating a paid plan doesn’t need an addon. Go to Memberships → Add New and name it.

Pick One-Time Payment or Subscription Based instead of Free. Set the price, and for a subscription, the billing cycle.

User Registration & Membership Subscription Based membership plan with Price and Billing Cycle fields, and a payment gateway setup notice

Getting paid for it is the part that needs a plan of your own: activate a payment gateway from Addons first. PayPal is available from the Personal plan; Stripe, Authorize.net, and Mollie need Plus.

If you try to publish before a gateway is active, the plugin flags it with a “payment setup is not configured yet” notice.

Once a gateway is connected, set the plan’s Access tab to the pages or posts you want paywalled. Do this the same way you would for a free plan.

The difference is simple. Nobody reaches that Access configuration without paying first, because the plan itself requires payment to join.

Use this for a paid course, a premium article series, or any content where the membership fee is the point, not just a login wall.


Conclusion

Now you know every way to restrict content in WordPress, and which one fits your situation. Match your situation to one of these:

  • Free Access settings if you need to gate a whole page, post, or site to a membership’s members, no roles or extra conditions.
  • A Content Rule if you need role-based or login-status restriction that isn’t tied to any membership plan.
  • The Content Restriction Block if you want part of a page free and the rest locked.
  • A paid membership plan if the content is meant to be paid, not just gated behind a free account.
  • A Content Rule with a narrower condition if you need something specific, like company-only access or a join-date cutoff.

Start with whichever one matches what you’re restricting today. You can always add the others later since they all live in the same plugin.

If this helped, follow us on X (formerly Twitter) and Facebook for more WordPress tutorials.


Frequently Asked Questions About Restricting Content in WordPress

Is it free to restrict content in WordPress?

Yes, for the basics. Every User Registration & Membership plan, including a free one, has an Access setting that can restrict an entire site, a page, or a post. Role-based rules, login-status rules, block-level restriction, and other conditions need the Content Restriction addon, available from the Personal plan.


Do I need to know code to restrict content in WordPress?

No. Every method in this guide is a settings screen or a block in the editor. You can restrict a page, a role, or a section without writing a line of PHP or CSS.


Can I restrict content to a specific user role only?

Yes. A Content Rule with the Roles condition grants or blocks access based on any WordPress role, including custom ones you’ve created. It doesn’t require a membership plan.


What’s the difference between restricting a page and restricting a section within it?

Restricting a page hides the entire thing from anyone who doesn’t qualify. Restricting a section only locks the part you place inside the Content Restriction block; the rest of the page stays visible. Use the block when you want a free preview with a locked section further down.


Can I restrict content to paying members only?

Yes. Create a One-Time Payment or Subscription Based membership plan and connect a payment gateway. Set that plan’s Access tab to the content you want paywalled. Only members who’ve paid for that plan get access.


How long does it take to set up content restriction?

The free Access setting takes a couple of minutes once you have a membership plan created. A Content Rule with a role or login condition takes about the same. Setting up a full paid membership plan with a payment gateway attached takes longer, usually 15 to 20 minutes the first time.

How to Restrict Content in WordPress by Role & Login Status
Scroll to top

Pin It on Pinterest