I have a page that I don't want to appear in the menu bar, so I made it private. However, the word Private: appears on the title of the page itself. How can I get that off?
Thanks,
Rosey Dow
I have a page that I don't want to appear in the menu bar, so I made it private. However, the word Private: appears on the title of the page itself. How can I get that off?
Thanks,
Rosey Dow
don't set it to private...
instead get the exclude pages widget
Just found this:
function the_title_trim($title) {
$title = attribute_escape($title);
$findthese = array(
'#Protected:#',
'#Private:#'
);
$replacewith = array(
'', // What to replace "Protected:" with
'' // What to replace "Private:" with
);
$title = preg_replace($findthese, $replacewith, $title);
return $title;
}
add_filter('the_title', 'the_title_trim');
Place it in your functions file. (I haven't tested it yet).
This topic has been closed to new replies.