How to remove the automatic private header in WP

142 views
asked Mar 19, 2014 in Website Builder by SunFun (3,000 points)
Hi
I am using WP with Twenty fourteen theme. I had a big issue in my site that I manages to recover, Now my question is how can I make the private pages that I have not display the word “Private” in the pages headers?
Can anyone please help
thanks

1 Answer

0 like 0 dislike
answered Mar 19, 2014 by TopNet (10,360 points)
locate the file functions.php and add  the following
function titleformat($yourcontent) {
   return '%s';
}
add_filter('privatetitleformat', 'yourtitleformat');
add_filter('protectedtitleformat', 'yourtitleformat');
...