Skip to content

Restricting Pages & Posts

bobbyalcorn edited this page Dec 16, 2025 · 1 revision

Restrictly™ gives you full control over who can view any page or post on your WordPress site — all managed directly from the editor, Quick Edit, or Bulk Edit panels.

This is the core of Restrictly’s access control system: role-based and login-based visibility, enforced server-side with airtight security. 🔒⚡


🔑 Login-Based Restrictions

You can control visibility based on authentication state:

  • ✅ Logged-In Users Only – Great for dashboards or member-only areas.
  • 🚪 Logged-Out Users Only – Useful for login/register pages.
  • 🌍 Everyone – Default; visible to all visitors.

This makes it simple to tailor your site — for example, hiding the login page from users who are already signed in or showing exclusive dashboards to members only.


👥 Role-Based Restrictions

Restrictly™ lets you restrict content to specific WordPress roles, such as:

  • Administrator
  • Editor
  • Author
  • Contributor
  • Subscriber

If a user’s role isn’t allowed, Restrictly fully hides the page — no menu link, no archive visibility, no search indexing.

They won’t even know it exists. 🔒


🧑‍🔬 Setting Restrictions

📝 Standard Edit Screen

  1. Open any Page or Post.

  2. Find the Restrictly™ Visibility panel in the editor sidebar.

  3. Choose one of the visibility modes:

    • Everyone
    • Logged-In Users
    • Logged-Out Users
    • Specific Roles
  4. If selecting Specific Roles, choose which roles can access.

  5. Optionally configure the Enforcement Action under Restrictly → Settings → Access Control:

    • Show a message
    • Redirect to a custom URL
  6. Click Update/Publish — Restrictly handles the enforcement.


⚡ Quick Edit

Restrictly integrates with Quick Edit so you can:

  • Change login visibility instantly
  • Assign specific roles
  • Update pages without opening the full editor

Fast and efficient when managing many posts.


📦 Bulk Edit

Bulk Edit allows applying restrictions to groups of posts:

  1. Select multiple items in the list table.
  2. Choose Edit → Apply.
  3. Set your desired Restrictly™ visibility options.
  4. Save — all items update simultaneously.

⚙️ Enforcement Logic

Restrictly™ enforces all restrictions server-side, ensuring unauthorized users:

  • ❌ cannot load restricted URLs
  • ❌ cannot query them via search or archives
  • ❌ cannot obtain content via the REST API
  • ❌ cannot access them through menus or navigation blocks

Behind the scenes, Restrictly stores settings using these meta keys:

Purpose Meta Key
Login-based visibility restrictly_page_access_by_login_status
Role-based visibility restrictly_page_access_by_role
Enforcement action restrictly_enforcement_action
Custom message restrictly_custom_message
Custom redirect URL restrictly_custom_forward_url

These values are enforced everywhere via:

  • Enforcement (front-end access enforcement)
  • QueryFilter (search, archives, and main query filtering)
  • FSEHandler (Full Site Editing block/theme compatibility)
  • RestHandler (REST API redaction and exclusion)

Total coverage. Zero loopholes.


🧢 Notes

  • The Administrator Bypass option (under Restrictly → Settings) lets admins view restricted content for testing.

  • Restricted content is automatically excluded from:

    • Search results
    • Archive listings
    • Navigation menus
    • FSE navigation blocks
    • REST API results
  • Restrictly™ Pro will extend this system to:

    • Custom Post Types
    • Taxonomies
    • Media restrictions
    • Advanced enforcement modes

✅ Result

Your content is now access-aware, context-aware, and fully protected.

Restrictly™ handles the enforcement behind the scenes, giving you:

  • A simple workflow
  • Rock-solid protection
  • Zero performance hit
  • Professional-grade access control

Clone this wiki locally