Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am wondering why my pages (post doesn't have this problem) have a double bar "|" in them

eg. About || Jiew Meng's Blog

UPDATE

Actually it appears in other pages too, like this. In this case, its a custom post type. Note the repeated site name

KLIF Media v2 |  | Jiew Meng's BlogJiew Meng's Blog

UPDATE 2 (@CorvanNoorloos)

Ok, I changed my title to

wp_title('')

Instead of the default wp_title('|', true, 'right') in TwentyTen. It fixed the double bar problem, but

If I go a Custom Post Type archive link, I get something like

PortfolioJiew Meng's Blog

If I go a custom post type single page link, I get

KLIF Media v2 - Jiew Men's BlogJiew Meng's Blog

If I force rewrite titles, it mostly works except for some pages, becoming

- Jiew Meng's Blog

I think I need to manually set the page title if I used this option?

share|improve this question

closed as off-topic by Pieter Goosen, Mark Kaplun, birgire, G. M., s_ha_dum Dec 8 at 16:17

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

    
Can't help you without any code. Can I see the header.php file from this theme? –  Kevin Langley Jr. Jan 3 '12 at 14:33

2 Answers 2

up vote 1 down vote accepted

I use this plugin together with TwentyTen too and encountered the same problem.

My solution is to leave wp_title( '|', true, 'right' ); unchanged but only enable the call to function bloginfo() in the next line if plugin WordPress SEO is inactive.

include_once( ABSPATH . 'wp-admin/includes/plugin.php' );

// Add the blog name.
if ( is_plugin_inactive('wordpress-seo/wp-seo.php') ) {
    bloginfo( 'name' );  //this call conflicts with plugin "Wordpress SEO"
}

I don't use 'Force rewrite titles'. For the title templates I use %%title%% | %%sitename%%. For the homepage I've entered my custom title text.

share|improve this answer

It's probably caused by a theme you've installed (in this case a somewhat modified version of TwentyEleven).

Joost's plugin needs <?php wp_title(''); ?> in the header.php.

Have you tried to enable “Force rewrite titles”? (which is currently available at SEO -> Titles)

share|improve this answer
    
I did modified the code, but just minimally, and definitely not the title (I might have caused some side effects perhaps) –  Jiew Meng Jan 4 '12 at 14:00
    
@jiewmeng AFAIK within TwentyEleven there's quite some code between the <?php wp_title(''); ?> single quotation marks. Have you tried removing it? What happened when you enabled the “Force rewrite titles”? Did it solve the issue? –  Cor van Noorloos Jan 4 '12 at 14:15
    
OK I tried what you just mentioned in Update 2 in main question post. It mostly works with force rewrite titles, but that isn't the recommended way is it? –  Jiew Meng Jan 4 '12 at 14:28
    
My suggestion would be to use the empty <?php wp_title('') ?> (with nothing in between the single quotation marks) AND to use Joost's title settings instead of the default WordPress ones. –  Cor van Noorloos Jan 4 '12 at 15:02

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