spacer internet marketing company internet marketing services web marketing workshops ProspectMX in the media The ProspectMX story spacer
spacer

Take out of Wordpress Titles

take-private-out-of-wordpress-titles

Update:

So, you’ll notice that the Title Tag of this page contains the term Private, but the H1 tag above doesn’t. This is a result of doing what I exlpain below. If you have a solution to fix this, leave it in the comments, please.

————————————————————-

I love the fact that you can make pages private in wordpress. It’s the easiest way to make a page not appear in the navigation, but still exhist on the site.

My problem has been that when you do this the title of the page changes from:

“Title Goes Here”

to:

“Private:Title Goes Here”

Now, I don’t understand the logic behind why it does this without there being an option to change it in the admin area, but I finally figured out how to fix it.

Go into the theme directory of the theme you’re using and back up the functions.php file.

Now, add this:

function remove_private_prefix($title) {
$title = str_replace(
'Private:',
'',
$title);
return $title;
}
add_filter('the_title','remove_private_prefix');

If you’re lucky like I way, “Private:” will magically go away. No more worries!


.:Subscribe To Comments

AddThis Social Bookmark Button

3 Responses to “Take out of Wordpress Titles”

  1. THANK YOU!!!!!!

  2. You are very welcome!

  3. Awesome tip Dave.

Leave a Reply

You can add images to your comment by clicking here.

formtop

 

My Fieldset
  1.  (required)
  2.  (valid email required)
  3.  (required)

formbottom