News

Remove “Private” and “Protected” from WordPress titles

Here’s some code I’ve dug up for removing the words “Private” and “Protected” from WordPress titles. These words are automatically prepended to the titles on private and password-protected posts and pages.


//remove Private and Protected from post titles
function my_private_title_format($text){
$text='%s';
return $text;
}
add_filter('private_title_format','my_private_title_format');
add_filter('protected_title_format','my_private_title_format');

Leave a Reply

Preserve code formatting within <code> and <pre> tags

What is 4 + 9 ?
Please leave these two fields as-is:
Please help us combat comment spam by answering this question.