A Quick Start to Your First Global Restriction

Updated on February 28, 2024
Content Control Restriction Steps Graphic 0

When you create a global restriction, you need to answer 3 questions.

  1. Who can see your content?
  2. How is your content protected?
  3. What content is protected?

Each question corresponds to a step for creating a restriction.

What’s in This Guide

In this quick start guide, you’ll create the most basic global restriction for your site’s default Sample Page. For this basic restriction:

  • You’ll let only logged-in visitors see the Sample Page.
  • You’ll redirect anyone not logged in to your site’s login page.
  • After logging in, they’ll automatically return to the Sample Page.

Did you see how we answered all 3 questions before we even started? Don’t worry if you didn’t. We’re going to answer them in a second.

Are you looking to protect a block instead of using a Global Restriction?
If you want to protect a block in the WordPress block editor, head over to A Quick Start to Your First Block Restriction.

Getting Started

First, from the side menu in your wp-admin area, go to Settings > Content Control.

Ccv2 Wordpress Settings Content Control 1024W

Click Add Restriction to get things started.

Ccv2 Global Restrictions Add Restriction 1024W

Create Your First Global Restriction

1. Set up who can see your content

Content Control Restriction Steps Graphic 1

Your very first global restriction will let only logged-in visitors see your content.

In the General tab, enter a name for your restriction.

Cc V2 Global Restriction Name 997W

Keep everything else the same.

  • Add description…: blank
  • Who can see this content?: Logged In Users
  • User Role: Any

Your restriction must have a name. Otherwise, you’ll get an error when you click Add Restriction.

Cc V2 Global Restriction No Name Error Message 1024W

2. Choose how to protect your content

Content Control Restriction Steps Graphic 2

Let’s protect your content by redirecting people to the login page. Then, they’ll get redirected back to the original post/page they were trying to see.

Click the Protection tab.

Ccv2 Global Restrictions Protection Tab Selected 1024W

For the Protection settings, keep everything the same.

  • How do you want to protect your content?: Redirect
  • Where will the user be taken?: Login & Back
  • Handling matches within archives: Filter the restricted items’ title, excerpt, and content.
  • Handling matches everywhere else: Filter the restricted items’ title, excerpt, and content.

Cc V2 Global Restriction Protection Tab New 1024W

3. Select what content to protect

Content Control Restriction Steps Graphic 3

Lastly, you’re going to protect the default Sample Page on your site.

Click the Content tab.

Ccv2 Global Restrictions Content Tab Selected 910W

Click Add Rule.

Cc V2 Global Restrictions Add Rule 584W

In the Search for a rule field, type “page”.

Cc V2 Global Restriction Search Page Rule 1024W

Scroll through the dropdown menu and click Content Is A Selected Page.

Cc V2 Global Restriction Is A Selected Page 1024W

Click inside the Select page(s) field and click Sample Page in the dropdown.

Cc V2 Global Restriction Select Sample Page 1016W

Heads Up!
You need to have at least 1 rule to enable your restriction. You can still save restrictions without any rules and add them later. But if try to enable your restriction with the Content settings blank (no rules and no groups), you’ll get an error message.

Cc V2 Global Restriction No Restriction Error Message 1024W

Having at least 1 rule is good ๐Ÿ˜Œ

Ccv2 Global Restrictions Content Tab Selected Page Rule Check 1024W

Having no rules is sad ๐Ÿ˜”

Ccv2 Global Restrictions Content Tab No Rules X 1024

If you haven’t yet, click Disabled to turn on your new restriction.

Cc V2 Global Restriction Disabled Toggle 387W

The Disabled toggle turns into Enabled when your restriction is on.

Cc V2 Global Restriction Enabled New 861W

Click Add Restriction to save everything.

Cc V2 Global Restriction Add Restriction New 1024W

Are you ready to add a group of rules? Head over to our How To Add a Restriction Group guide to learn how.

Before You Go

Notice that the only things you “touched” in this process were:

  • The restriction name
  • The content rule section

So now, you’ll have to log in as any role to view the Sample Page on your site.

If you’re logged out and go to the Sample Page, you’ll get redirected to the login page. Once you log in, you’ll automatically go back to the Sample Page. This time, you’ll see the content.

Take it for a spin ๐Ÿ˜Œ

Pro tip: Always make sure to clear all caches on the browser, WordPress, server, and CDN before testing any changes.

Are you ready to level up?

Check out these guides to learn more about setting different user roles, protection methods, and content restriction rules.

Is this article helpful? What are your feelings