Take out of Wordpress Titles
Update:
So, you’ll notice that the Title Tag of this page contains the term Private, but the H1 tag above doesn’t. This is a result of doing what I exlpain below. If you have a solution to fix this, leave it in the comments, please.
————————————————————-
I love the fact that you can make pages private in wordpress. It’s the easiest way to make a page not appear in the navigation, but still exhist on the site.
My problem has been that when you do this the title of the page changes from:
“Title Goes Here”
to:
“Private:Title Goes Here”
Now, I don’t understand the logic behind why it does this without there being an option to change it in the admin area, but I finally figured out how to fix it.
Go into the theme directory of the theme you’re using and back up the functions.php file.
Now, add this:
function remove_private_prefix($title) {
$title = str_replace(
'Private:',
'',
$title);
return $title;
}
add_filter('the_title','remove_private_prefix');
If you’re lucky like I way, “Private:” will magically go away. No more worries!


November 15th, 2008 at 9:54 pm
THANK YOU!!!!!!
November 16th, 2008 at 10:54 am
You are very welcome!
November 16th, 2008 at 4:02 pm
Awesome tip Dave.