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%%


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?

| 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. – urok93 May 19 '13 at 16:54
  • Updated the question accordingly. – urok93 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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