redacted text in wordpress

Are you looking for a way to mask or hide certain parts of your website’s content? Then you need to learn about redacted text in WordPress and how to do it. We’re going to cover that in this guide. 📚

The good news is that learning how to redact text in WordPress is easier to achieve than you might think. Using straightforward tools like the Eyes Only plugin, allow you to manually hide text using the WordPress editor or configure it automatically in your plugin settings.

👉 In this post, we’ll discuss why you might want to redact text in WordPress. Then, we’ll show you how to do it in just a few steps. Let’s get to it!

Why redact text in WordPress?

Before we dive into how to create redacted text in WordPress, let’s go over what it is and why you may want to do it. First of all, to “redact” simply means to censor or obscure specific parts of a text:

An example of redacted text in WordPress.

In the example above, a customer’s identity is hidden – or redacted. This is a common use case.

In general, redaction is often necessary for legal or privacy reasons, but when it comes to online publishing, there are a few different scenarios in which you might want to do it.

For instance, let’s say you’re a freelance accountant who runs a financial blog on the side. In your tutorials, you may want to provide real world examples of official documents that are partially filled in, without revealing any sensitive information.

Alternatively, if you offer premium content on your site, you might want to entice people into becoming paying customers with redacted text in WordPress. You could provide a preview of your material, blurring out the most valuable details, thereby encouraging people to sign up for your membership site or online course. 👨‍🏫

How to redact text in WordPress

Now that you know why you might want to create redacted text in WordPress, we’re going to show you how you can do this in three steps!

Step 1: Install and activate the Eyes Only plugin

The great thing about WordPress is that it allows you to expand its functionality using plugins. When it comes to redaction, the easiest way to do it is with the Eyes Only plugin.

Therefore, the first step is to navigate to your WordPress dashboard. Then, go to Plugins > Add New and search for “eyes only:”

The Eyes Only plugin.

Once you locate the tool, click on Install Now followed by Activate. Eyes Only doesn’t require any configuration, so you’re now ready to move on to the next step!

Step 2: Manually redact text in the WordPress editor

If you only need to redact a small amount of text or a singular blog post, you may want to do so manually. To get started, simply navigate to the page or post that contains the text that you want to hide. Then, open the Block Editor.

For our example, we’ll be redacting a “premium” blog post:

A premium blog post example.

To begin redacting, simply click on the three vertical dots at the far right of your horizontal menu. This will open your Options. Find the Editor panel and select Code Editor:

Opening the code editor in WordPress.

This will automatically switch you from the visual editor to the code editor, but don’t stress! We’re going to be using only the most basic HTML here.

Next, locate the place where you want your redacted text in WordPress to start. Here, type in [redact]. Then, find the point where you want the redaction to end and type [/redact] after that:

Redacting text in WordPress.

Now simply hit Update to finalize your changes! And, if you want to return to your visual editor, you can hit Exit code editor at anytime.

Keep in mind, though, that you won’t be able to see the redaction in action when you are signed in as an admin on your WordPress site.

To double check it’s working, you’ll either need to sign out or use an incognito browser tab to see the redaction on the frontend.

Here’s how our example turned out after a bit more redacting:

Final example of redacted text in WordPress.

It’s as simple as that!

Also, as you can see, we used the Block Editor, but if you’re still using the Classic Editor, you’ll be able to use the Eyes Only redact button instead.

Step 3 (optional): Set up automatic redaction in your plugin settings

If you want to redact content across your WordPress website, you might want to set this up in your plugin settings instead. This way, you can mask specific words and phrases automatically in one fell swoop.

Let’s see how this would work.

To begin, return to your WordPress dashboard. Then, go to Settings > Eyes Only:

Eyes Only plugin Settings.

This will take you to the Automatic Redactions screen. Click on Add New:

Automatic redactions screen in WordPress.

Here, you can simply type in the word or phrase that you’d like to redact across your WordPress site.

For the sake of this example, we’ll use the word “Premium.” And our replacement text will be “Members-Only:”

Adding automatic redacted text in WordPress.

Next, click on Add followed by Save Changes. That’s it!

If you want to delete an automatic redaction, simply hover over it and click on Delete followed by Yes. Then, save your changes:

Deleting automatically redacted text in WordPress settings.

Keep in mind that the Text field is case sensitive. That means if you want all variations to be redacted in WordPress, you’d also need to add a redaction for “premium” in this scenario.

Conclusion 🧐

If certain pages on your website contain sensitive information, or if you’d like to hide premium content from users, you may want to mask specific text. However, WordPress doesn’t offer this functionality out of the box.

Fortunately, you can create redacted text in WordPress using a plugin such as Eyes Only. After you install the tool, you can manually redact text in the WordPress editor.

👉 However, if you’re looking for an alternative approach, you might consider creating private WordPress posts or managing WordPress user roles.

Do you have any questions about how to create redacted text in WordPress? Let us know in the comments section below!

Free guide

4 Essential Steps to Speed Up
Your WordPress Website

Follow the simple steps in our 4-part mini series
and reduce your loading times by 50-80%. 🚀

Free Access

Inline Feedbacks
View all comments

Or start the conversation in our Facebook group for WordPress professionals. Find answers, share tips, and get help from other WordPress experts. Join now (it’s free)!