Remove ‘Private:’ from WordPress Post Titles

Here’s a useful function to remove the words ‘Private:’ which WordPress adds automatically to private post and page titles.
Add to your functions.php file for the best results!

function remove_private_from_title( $format ) {
    return "%s";
}
add_filter( 'private_title_format', 'remove_private_from_title' );

Leave a Reply

Your email address will not be published. Required fields are marked *