It’s a WordPress core issue, and one I’m not sure we can easily filter out. I’ll take another look at this for 2.2, but I think it’s hard-coded in.
Hmm, not great but thanks for the info.
Expanding my search to include all of WordPress resulted in this fine code I just plop in to my functions.php that’ll remove it:
function the_title_trim($title) {
// Might aswell make use of this function to escape attributes
$title = attribute_escape($title);
// What to find in the title
$findthese = array(
'#Protected:#', // # is just the delimeter
'#Private:#',
'#Privat:#'
);
// What to replace it with
$replacewith = array(
'a', // What to replace protected with
'b' // What to replace private with
);
// Items replace by array key
$title = preg_replace($findthese, $replacewith, $title);
return $title;
}
add_filter(‘the_title’, ‘the_title_trim’);
Credit: https://wordpress.org/support/topic/how-to-remove-private-from-private-pages?replies=24
Nice tip. I’m unsure we’ll use such a brute force method since we’ll only want to apply this to bbPress titles, but good to know it’s possible. Though, it’d be better to avoid it being added at all.
Hey John,
I’m facing the exact same problem and wondering if you reviewed it in 2.2? Is there a less brutal method of removal?
Yes there is a less brutal method…Instead of targeting all WP titles, you can target only bbPress titles.
Filter on ‘bbp_get_forum_title’ and ‘bbp_get_forum_archive_title’
My problem with this is my forum title shows up as Private: Private” forum title. Posted in a separate thread on how to eliminate the double or even why it’s there, but open to help from anybody here, too.
Thanks,
Adam
I posted a solution adding a filter to `’private_title_format’ here: https://bbpress.org/forums/topic/created-private-forum-but-title-is-private-private-own-your-mission-forum/#post-131731
`
The ‘Private Forum’ appendix could then be replaced by using a language file, e.g.
I have a better than layman’s grasp of code, but not much better. Have read multiple threads. Is there an easy way to resolve the “Private: Private:” issue? I’d prefer there to be no “private” at all even though the forum is in fact private.