How to Change Private and Protected Post Prefix in WordPress
Apr 20, 2025 am 06:03 AMDo you want to change the private and protected post prefix in WordPress?
By default, WordPress adds a "Private" or "Protected" prefix to the post title when you set the post title to private or password protected.
In this article, we will show you how to easily change the "private" or "protected" post prefix in WordPress to whatever you like.
What are private or protected posts in WordPress
WordPress comes with some basic tools to create content and keep it from being viewed by the public. You can select these options under the Status and Visibility box on the editor screen.
The "Private" option only allows logged in users to view content. Users need at least the editor or administrator user role to view private content.
The Password Protection option allows anyone with a password to view content, even if they are not a user of your WordPress site.
When you post a private post, WordPress automatically displays "Private" as the prefix before the post title.
A logged in administrator or editor user can see it on the post or page itself, as well as on any archived page, such as the home page or main blog page.
Similarly, WordPress adds a "protected" prefix to password-protected posts and pages.
The reason for adding these tags to post titles is to distinguish them from other non-private and public posts on your website.
Now, some users may want to change these prefixes to something that makes more meaningful or helpful to their audience.
That being said, let's see how to easily change private and password-protected post or page prefixes in WordPress.
Change private and protected prefixes in WordPress
For this tutorial, you need to add some code to your WordPress website. If you haven't done this before, see our guide on how to paste code snippets in WordPress.
1. Change the protected post prefix
Just add this code to the theme's functions.php file, site-specific plugin, or WordPress code snippet plugin.
Next, navigate to the "Add Custom Code (New Snippet)" option and click the "Use Snippet" button below it.
Now you can specify a title for the code snippet, which can be anything that helps you remember the purpose of your code.
Then, paste the above code snippet into the Code Preview box and select "PHP snippet" as the code type from the drop-down menu on the right.
After that, just switch the switch from "Inactive" to "Active" and click the "Save Fragment" button.
You can now preview password-protected posts on your website. Here is what it looks like on our testing website.
Change the prefix of private posts
Similarly, you can change the prefix of a private post using the following code.
Reward: Properly protecting content in WordPress
If you often share content with specific users as private or password-protected posts, it's best to start using the appropriate tools to manage user access.
MemberPress is the best WordPress membership plugin on the market. It has powerful access control capabilities that allow you to limit content to specific users.
You can create user groups and limit certain posts or pages to those groups. You can also add a paid subscription to sell member-exclusive content on your website.
For full instructions, see our tutorial on how to create a membership website in WordPress.
We hope this article helps you understand how to easily change private and protected post prefixes in WordPress. You may also want to check out our tutorial on how to protect your entire WordPress website with your password or how to create a private blog using WordPress.
The above is the detailed content of How to Change Private and Protected Post Prefix in WordPress. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Contents 1. What is ICN? 2. ICNT latest updates 3. Comparison and economic model between ICN and other DePIN projects and economic models 4. Conclusion of the next stage of the DePIN track At the end of May, ICN (ImpossibleCloudNetwork) @ICN_Protocol announced that it had received strategic investment in NGPCapital with a valuation of US$470 million. Many people's first reaction was: "Has Xiaomi invested in Web3?" Although this was not Lei Jun's direct move, the one who had bet on Xiaomi, Helium, and WorkFusion

As July 2025 approaches, the crypto market is hotly discussing which tokens may bring high returns. Are names like Pi, PEPE and FloppyPepe really worth the risky investment? Potential cryptocurrencies worth paying attention to in July 2025: virtual fire or real gold? As mid-2025, the heat of discussions on high-yield crypto assets continues to heat up. Bitcoin trends and "altcoin season" expectations have attracted investors' attention. Do tokens like PiNetwork, PEPE and FloppyPepe have the potential to bring considerable investment returns? Let's analyze its prospects one by one. Altcoin Market: Can July get what it wants? Against the backdrop of Bitcoin’s expected record of historical highs, the “altcoin season” seems to be brewing. Back

The latest version of Binance is v2.102.5, and the update tutorial is: 1. Click the download link in the web page; 2. Authorize the installation permission of "Allow installation from unknown sources"; 3. Find the downloaded APk and click to install; 4. Click the installed application to open it.

The latest version of Binance is v2.102.5, and the update tutorial is: 1. Click the download link in the web page; 2. Authorize the installation permission of "Allow installation from unknown sources"; 3. Find the downloaded APk and click to install; 4. Click the installed application to open it.

The latest version of Binance is v2.102.5, and the update tutorial is: 1. Click the download link in the web page; 2. Authorize the installation permission of "Allow installation from unknown sources"; 3. Find the downloaded APk and click to install; 4. Click the installed application to open it.

The latest official version of the virtual currency trading platform v6.129.0 is a professional and secure digital asset trading application created for Android users. It provides rich market conditions, convenient trading functions and multiple security protection, and is committed to providing users with a first-class trading experience.

The latest version of Binance is 2.101.8, and the update tutorial is: 1. Click the download link in the web page; 2. Authorize the installation permission of "Allow installation from unknown sources"; 3. Find the downloaded APk and click to install; 4. Click the installed application to open it.

The latest version of Binance is 2.101.8, and the update tutorial is: 1. Click the download link in the web page; 2. Authorize the installation permission of "Allow installation from unknown sources"; 3. Find the downloaded APk and click to install; 4. Click the installed application to open it.
