Skip to content
memberarea memberarea.io

Locking a page to members or a course

Protect a whole page, or single blocks inside it, and choose what visitors without access see.

In this article

The plugin can protect a whole page or single blocks inside it. Both rules are checked on your server before anything is sent, so protected text never reaches a browser that may not see it.

Lock a whole page

  1. Open the page in the block editor.
  2. In the Page tab of the sidebar, open the memberarea access panel.
  3. Under Who may read this, pick one of: Everyone (the default), Signed-in members, Visitors who are not signed in, Members with a course, Members in a group or Members who bought a product.
  4. For the last three, a second field named Which one appears. Pick the course, group or product there.
  5. Under Visitors without access, choose what happens:
    • See a short message instead, with your own wording if you like.
    • Are sent to the sign-in, which takes them to your memberarea and brings them back to the page afterwards.
    • Are sent to another page, for example your sales page.
Warning

If you leave Which one unset, the rule falls back to plain members-only: every signed-in member may read the page, whether or not they hold the course. The panel warns you about this, but the page still saves.

The memberarea access panel with a course rule and a message for visitors
The memberarea access panel with a course rule and a message for visitors

Hide a page from members who are already signed in

Visitors who are not signed in turns the rule around: the page is open to strangers and closed to everybody who is signed in. Use it for a sign-up page, a free trial offer or a sales page that a paying member should never land on.

Because everybody this rule refuses is signed in already, Are sent to the sign-in is not offered for it, and the notice carries no Sign in button. The two remaining answers are a short message or a redirect, for example to the member dashboard.

The redirect target has to be a page on this WordPress site. An address on another host, including your memberarea, is ignored, and the visitor sees the short message instead. Use a page here, and let that page link onwards.

The rule applies to the page everywhere it appears: the page itself, its excerpt, archive listings, search results and query loops. Setting a rule needs the block editor, but an existing rule keeps working whatever editor you use afterwards.

Lock single blocks

Any block can be shown to a subset of visitors. Select the block, open the Block tab in the sidebar, and expand memberarea visibility. Under Show this block to, pick everyone, signed-in members, visitors who are not signed in, or holders of one course, group or product.

This is how you build one page that reads differently for buyers and for strangers: a sales section for guests, the real content for members.

What a visitor sees

A visitor without access sees your short message and, if they are not signed in, a Sign in button. A signed-in member who lacks the right course or product sees a message that says so, with no sign-in button, because signing in again would not help. On a page reserved for visitors who are not signed in, a signed-in member reads that the page is not for them, again without a button.

If your memberarea cannot be reached at that moment, the plugin keeps the content closed and says the membership could not be checked. It never opens protected content on a failed check.

Caching

Pages stay cacheable for anonymous visitors and carry a header that tells shared caches to keep member and guest copies apart. As soon as a visitor is signed in, responses are marked not to be cached, including for the common cache plugins that honour DONOTCACHEPAGE.

Caution

A page cache that ignores those headers can serve a signed-in member's copy of a page to a stranger. If you use one, check that it honours Vary: Cookie and DONOTCACHEPAGE before you rely on locked pages.

Last updated on September 18, 2026

Was this article helpful?

Related articles