WordPress.org

Ready to get started?Download WordPress

Forums

'Protected:' in title (7 posts)

  1. sqww
    Member
    Posted 6 years ago #

    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?

  2. markdw
    Member
    Posted 6 years ago #

    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.

  3. whooami
    Member
    Posted 6 years ago #

    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

  4. markdw
    Member
    Posted 6 years ago #

    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.

  5. whooami
    Member
    Posted 6 years ago #

    macs have grep.

    grep Protected: *

  6. Raptor2000
    Member
    Posted 6 years ago #

    Is there any way to remove the word "Private" , without hacking the WP core files?

  7. tekkned
    Member
    Posted 5 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...

Topic Closed

This topic has been closed to new replies.

About this Topic