ARGH WordPress! ;(

Maybe someone else can explain why this is such a fantastic idea – for Hungry Hacker, I wanted to have the page title before the site title, and I wanted it separated by a hyphen. Doesn’t seem too hard to do, wp_title() accepts a few arguments just perfect for the purpose.

So I reverse the two tags, and change wp_title() to wp_title(‘-’, 1, ‘right’), which puts the separator on the right hand side instead of the left. Awesome!

Wait, something’s not quite right – the dash is a little longer than the one before “Mozilla Firefox”. I go to check another page – Google’s Webmaster Tools – and they’re using a plain ol’ hyphen and it looks the same. What the fuck is this? I check the source of my rendered WP blog, and it’s not a hyphen at all.

For some reason, if you set wp_title’s “sep” parameter to ‘-’, it arbitrarily changes it to an “en dash” (– or a dash the width of an “n”). Considering that the default is », I can’t for the life of me figure out who the hell thought this would be a good idea.

Can someone explain it to me? If I meant to have an –, I’d have put one!

Leave a Reply