I just made the upgrade from version 2.2 to 2.3 and my password protected posts now have 'Protected:' in the title on the outputted page, and on post summary page (edit.php) in the admin. When I click 'edit' it's not in the title field. I have tested adding a new entry and the same thing happens.
I checked in the wp_posts table in the database and 'Protected:' isn't appearing there. I'm a bit stumped as to how this is happening - I'm not sure if it's in code or the database, or how to go about fixing it.
Can anyone offer any assistance?
I am also looking to do the same. I am pretty sure that it will be sat in a php file somwhere but where is another question.
I want to remove the word protected altogether from the title and make it just say the page name.
Hope someone can help.
I am pretty sure that it will be sat in a php file somwhere
Ya think?
function get_the_title( $id = 0 ) {
$post = &get_post($id);
$title = $post->post_title;
if ( !empty($post->post_password) )
$title = sprintf(__('Protected: %s'), $title);
else if ( 'private' == $post->post_status )
$title = sprintf(__('Private: %s'), $title);
return apply_filters( 'the_title', $title );
}
inside wp-includes/post-template.php
I suggest downloading wingrep from here, and learning how to use it.
http://www.wingrep.com
I use a mac unfortunately for this program. Thanks for the help though. After lots of searching I have found the chunk of code that I need to change - just as you say above.
macs have grep.
grep Protected: *
Raptor2000
Member
Posted 3 years ago #
Is there any way to remove the word "Private" , without hacking the WP core files?
tekkned
Member
Posted 3 years ago #
Well, I found a solution on removing the "Private:" part in private messages. You need to edit a file in your template dir called functions.php.
But when I put in there my pictures cannot be found anymore. They just turn into red crosses all of a sudden. I use the NextGen Gallery to show pictures.
Anyone an idea? Ty...