What’s in This Guide
This guide covers how to protect your content using a custom message in your Global Restriction. Starting with version 2.0, you can also use an existing page for your custom message.
If you’d rather use a redirect, read our How To Protect Content Using a Redirect guide.
Setting up how to protect your content is the second of the 3 main steps for creating a Global Restriction.
Protecting content using a custom message applies only to Global Restrictions.
Are you looking to protect a block instead?
If you want to protect a block in the WordPress block editor, head over to our How To Add a Restriction to a Block guide.
Use a Custom Message to Protect Your Content
Here’s how you tell Content Control to protect your content with a custom denial message.
1. Add a new Global Restriction or hover over an existing one and click Edit
If this is a new restriction, enter a name for it (e.g., “Custom Message Protection”).
2. Click Protection, then click Replace Content
Keep the default Custom Message selected as the Replacement Type.
3. Click Override the default message?
Then, type your custom message.
Typing a message here overrides the default denial message in the Content Control settings.
4. Click Save Restriction
Pro Tip: You can display a post or page excerpt above the denial message. Here’s how.
Click Show excerpts above access denied message?.
Here’s an example of what that’ll look like.
Use an Existing Page to Protect Your Content
Using an existing page to protect your content is an excellent choice if you want to:
- Reuse an error page you already display throughout your site.
- Carefully tailor a custom denial page using blocks or a page builder.
Replacing your content with an existing page is also more efficient than a redirect. That’s because the protected page still loads (no redirect and no URL change). But instead of showing the restricted content, Content Control replaces it with your existing page’s content.
Here’s how you tell Content Control to protect your content with an existing page.
1. Add a new Global Restriction or hover over an existing one and click Edit
If this is a new restriction, enter a name for it (e.g., “Use Existing Page Protection”).
2. Click Protection, then click Replace Content
3. Click Use Existing Page
Then select a page from Choose a page to replace the content with. dropdown.