Jul 03 2008 at 12:41pm
Fixing my wordpress title tags, revisited
One of the most popular posts on my blog is my guide to fixing the wordpress title tags. It’s enjoyed a great run so far, but as of today has become obsolete. Well, for myself anyway.
Via WordPress SEO I discovered the HeadSpace plugin. HeadSpace allows you to specify a custom title format for all wordpress page types. It does lots of other cool stuff with metadata, like:
- auto-suggesting tags
- mass-editing metadata, including title, description, slugs (urls), and tags/keywords
- adding a custom title or description per post
- adding custom css of javascript files depending on the page type or on a per-post basis
Previously I had other plugins to do some of those things so it’s nice to have it all in one. I was a little concerned about bloat or annoying interface extras but I don’t find that to be a problem (yet). Here’s a screenshot of the title tag settings page:
HeadSpace works with modules that you can add to your write page, either hidden behind a link or always appearing. It’s basically an all-in-one metadata customizer and editor.
Here’s a screenshot of how this is implemented on the “write” page:
More screenshots are available from the HeadSpace site.
Customization on title tags could also be done with the SEO Title plugin. This one works a little differently by allowing you to add a custom title tag for individual posts and pages. I don’t think it can change the default format of titles but I haven’t installed it so I’m not sure about that.
If these solutions seem like overkill to you, my old title tag code may work just fine.






rosa July 29th, 2008 at 12:35 pm
Thank you so much for this blog, it is wonderful. As someone who helps other, Im always looking for great information and I cant wait to share this one to my contact.
Thanks!
Sultan August 30th, 2008 at 8:48 am
Using Headspace and still can’t get rid of the seperator (>>) even after editing header.php. Am I missing something?
Daniel Salvage March 25th, 2010 at 6:21 am
Thanks for this, I’ve been looking for weeks for something to sort out my titles. The plugin worked perfectly!
Dan
Lenny23 June 3rd, 2010 at 10:46 am
Thanks for explaining the HeadSpace plugin. My present problem I’m working on since a couple of weeks but can’t solve it, is, that I’m having in my title this | separator sign at the beginning, it looks like | MYHOMEPAGE, ugly. How to remove this |, separator ?
Template is “vigilance” theme (http://thethemefoundry.com/vigilance/), but probably it has to be corrected somewhere in the wordpress core files?
This happened when I deleted a plugin a couple of months ago and from that time this separator was right at the beginning of the title name.
So, my question is, does the HeadSpace plugin give me access to correct this via the HeadSpace plugin panel? Thanks!
Megan June 7th, 2010 at 8:00 am
Hi Lenny,
Yes, Headspace will fix this for you. It will overwrite all of the existing WordPress titles. However, it would be good to diagnose the problem in the first place. I don’t know where that | separator would be coming from because (unless they’ve changed it recently), wordpress uses » as a separator in titles by default. Try disabling plugins one-by-one to see if that changes anything. Also try switching to the default theme and see if that does anything. That will at least help you identify where the problem is occurring.
You could also try working with the code that I posted here.
Megan June 7th, 2010 at 8:08 am
Okay, on further examination the | is from the way the titles are written in the vigilance theme. If you look at the header.php file in your theme editor you’ll see it there. You could try either copying the title bit from the default theme, or using the code I posted in the article I linked above. I can’t offer much more advice without seeing how your blog is set up.
Lenny23 June 14th, 2010 at 2:23 am
Thanks Megan, I tried what you said, but the plugins are not the cause. I slightely remember it happened when disabling and deleting a wordpress SEO plugin. The uploaded header.php of the vigilance theme looks like, http://pastebin.com/iaJvsMBu . I tried to exchange the code within line 7 and line 13 of with, “Final Solution” (http://meganmcdermott.com/2006/11/21/fixing-my-wordpress-title-tags/) but then got a white page. When changing the theme to “WordPress Classic” this also doesn’t change it, so it could be also in the database?
Lenny23 June 14th, 2010 at 2:30 am
Why I’m still hesitating to use Headspace2 is, on the Headspace forum quite lots of people report conflicts with other plugins. Since I’m using 26 plugins, might be risky to install a plugin that possibly writes entries into the database which cannot be changed after uninstalling the plugin?
Megan June 24th, 2010 at 10:10 am
So, do your titles look like ” | Your Blog Name”? In that case it’s not pulling a title for the post and I don’t know why. The code in the vigilance theme is similar to what I posted (although what I posted is probably using outdated methods and I can understand if it doesn’t work! I posted a warning on there in case anyone else has problems with it). So I wonder if one of the plugins did something with that ????
The relevant code in the header.php file looks like this:
<?php wp_title($sep = ''); ?> | <?php bloginfo('name');?>. This means print the title of the post, then a separator |, then the name of your blog as specified in your WordPress settings. If it’s showing the separator first it’s not getting a value for the post title (wp_title).Sorry I can’t help you with this. The only thing to do here may be to re-install. It shouldn’t be in the database because your posts do have titles (I’m assuming…), they’re just not being pulled into the title properly.
Lenny23 July 1st, 2010 at 1:45 pm
Thanks Megan! Today I installed Headspace2 Version 3.6.33 and it works fine, all the other plugins work also. At HeadSpace | Page Settings I entered the title of my blog but this didnt change it. Memory usage went up, but is still ok. Meanwhile I also upgraded to WordPress 3.0 and the Vigilance template also had an upgrade (vers.1.50). But still the frontpage of my blog (2500 posts) looks like ”| My Blog Name”. As you say, when making a whole new install it would work. But that’s not worth the endeavour for this tiny error? Again, thanks for taking the time!