WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to set up titles of posts with WordPress SEO, however my title gets output like this:

My post name

There is no separator and site name.

Here's the code in the theme:

  <title><?php wp_title(''); ?></title>

In the WordPress SEO settings, under Post Types > Posts I have the following setting for titles:

%%title%% %%page%% %%sep%% %%sitename%%

share|improve this question
up vote 5 down vote accepted

From the WordPress SEO FAQ:

... either enable "Force rewrite titles" on the SEO -> Titles settings page, or go into your header.php and change the title element to just this:

<title><?php wp_title(''); ?></title>

Did you try that?

share|improve this answer
+1. The only thing that should ever be inside the HTML <title></title> tags is <?php wp_title(); ?> (with or without args). Plugins use the wp_title filter to modify the output of wp_title(), and Themes should do likewise, in order to play nicely with SEO Plugins. – Chip Bennett May 17 '13 at 20:17
Tried both of those but it still didn't change it to what I want. – drtanz May 19 '13 at 16:54
Updated the question accordingly. – drtanz May 19 '13 at 17:02
Don't know why people vote down this question, I can see why you had that code (which you now have removed) cause it's what is used in the default themes; Twentyeleven and Twentytwelve etc. However, if you want a separator you need to add that to the wp_title function: <title><?php wp_title('|'); ?></title> – Richard B May 19 '13 at 18:53
Also, try to restore default settings if you haven't already. – Richard B May 19 '13 at 19:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.