Remove 'Private:' suffix from Wordpress title

/ Published in: PHP
Save to your folder(s)

Thanks to Jennifer Zelazny

You can see complete post in

Add the following code into functions.php file (within theme directory)

Copy this code and paste it in your HTML
  1. function remove_private_prefix($title) {
  2. $title = str_replace('Private:', '', $title);
  3. return $title;
  4. }
  5. add_filter('the_title','remove_private_prefix');

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.