Remove 'Private:' suffix from Wordpress title


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

Thanks to Jennifer Zelazny

You can see complete post in http://www.sandboxdev.com/blog/wordpress/178/remove-private-from-wordpress-titles/comment-page-2/#comment-16447

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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.