Removing Private from WordPress Posts and Pages

I always run into this problem when I’m using a contact form and I need to make a thank you page. This is pretty standard practice so Google Analytics can correctly do goal tracking for conversions. The point being that the last thing you want in the menu of your site is “Thank You”, so of course I make it private. Then the problem becomes the big fat “Private” tag prefixed to the title and breadcrumb of the page.

To do this, there is a really nice forum page on wordpress.org
http://wordpress.org/support/topic/how-to-remove-private-from-private-pages

The quick version is to get into the oh so scary “core” files of wordpress and remove the private tag.

You need to check out the post-template.php file and look for the function named “get_the_title($id=0)

Here is what the function looks like.

 function get_the_title( $id = 0 ) {
 $post = &get_post($id);

$title = $post->post_title;

if ( !is_admin() ) {
 if ( !empty($post->post_password) )
 $title = sprintf(__('Protected: %s'), $title);
 else if ( isset($post->post_status) && 'private' == $post->post_status )
 $title = sprintf(__('Private: %s'), $title);
 }
 return apply_filters( 'the_title', $title );
 }

All you need to do is change the line that reads

 $title = sprintf(__('Private: %s'), $title);

to …

 $title = sprintf(__('%s'), $title);

and save it.