Below is the code to remove the word “Private:” from WordPress private post titles.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Remove the word "Private:" from private post titles | |
function prefix_remove_private_from_post_titles($title) { | |
return '%s'; | |
} | |
add_filter('private_title_format', 'prefix_remove_private_from_post_titles'); |