Family Encyclopedia >> Electronics

How to change the prefix of private and protected posts in WordPress

Do you find yourself having a lot of private or protected posts? If you do, then you'll likely notice that WordPress puts Private:or Protected:in front of the title. Most users might neglect what's happening up front, if they're the only ones seeing the site. But, if you have a multi-author blog or a personal blog, you can make things interesting by changing the default prefix.

For example:If you have a personal blog that your family reads, then you can have the title of all posts protected by saying, "Family only:Post title goes here."

In this article, we will show you how easy it is to change the prefix of private and protected posts in WordPress.

Change protected posts prefix

Simply paste the following code into your theme's functions.php file

 función change_protected_title_prefix () return 'Family Only:% s'; add_filter ('protected_title_format', 'change_protected_title_prefix'); 

Change private post prefix

Paste the following code into your theme's functions.php file:

 function change_private_title_prefix () return 'Solo para editores:% s'; add_filter ('private_title_format', 'change_private_title_prefix'); 

You don't have to use the examples we suggest. You can be creative with this. This is just another way you can improve your blog.

This item is brought to you by the leader in fast printing of postcards, overnight flyers.