Support » Fixing WordPress » my blog name is duplicated in title!?

  • Hi,

    My blog name is duplicated to the right of my title on PAGES and POSTS but is correct on my home (front page).

    I have used the following php

    <title><?php bloginfo('name'); ?> | <?php is_front_page() ? bloginfo('description') : wp_title(''); ?></title>

    I have looked at the codex but for the life of me I can’t figure out how to remove the duplication of my blog name!

    Please take a look at my website

    Can anybody help please? much appreciated!

Viewing 15 replies - 1 through 15 (of 26 total)
  • esmi

    (@esmi)

    Forum Moderator

    I can’t see anything wrong on your site. Can you clarify, please?

    Hi esmi,

    Sorry, my blog name ‘ALB’ is showing twice on the title bar of the browser window.

    Take this PAGE for example. It reads ‘ALB | AboutALB!’

    I only want the format ‘ALB | About’.

    However, it is NOT DUPLICATED on my FRONT PAGE (homepage) which is correct.

    Thanks for you help 🙂

    esmi

    (@esmi)

    Forum Moderator

    Try:

    <title><?php is_front_page() ) bloginfo('name');
    else wp_title(''); ?></title>

    Thanks esmi,

    but it’s says there is a syntax error in dreamweaver with the code you suggested…

    esmi

    (@esmi)

    Forum Moderator

    Sorry – my bad. Try:

    <title><?php if( is_front_page() ) bloginfo('name');
    else wp_title(''); ?></title>

    Thanks esmi you’re a star!

    I would also like to show

    bloginfo(‘description’)

    on the front page. How can I achieve this?

    Thanks again!

    esmi

    (@esmi)

    Forum Moderator

    <title><?php if( is_front_page() ) :
    bloginfo('name');?>  | <?php bloginfo('description');
    else: wp_title(''); ?></title>

    Thanks for your help esmi,

    But again the code you suggested threw up a syntax error in my header.php. SO NEARLY THERE!

    I did find an interesting article here and I have implemented the code but again my site title is duplicated at the end of my front page, pages and posts titles! e.g About | ALBALB.

    Any suggestions? Thanks again.

    esmi

    (@esmi)

    Forum Moderator

    What was the syntax error?

    Are you using Yoast WordPress SEO?

    esmi, I’m not sure exactly the error is on a blank line?!

    See my screen shot

    wvasko, no i’m not using the Yoast WordPress SEO plugin…should I be?

    Thanks

    BTW, I am using a child theme of Fluxipress.

    esmi

    (@esmi)

    Forum Moderator

    I can’t see an obvious syntax error.

    no, I had that kind of problem with Yoast wp SEO plugin, my site name was displayed twice, but I’ve sorted out that one.

    wvasko, how did you sort it out?

    esmi, yes it’s strange I’m stumped!

    Did anyone take a look at this article I mentioned previously?

    I implemented the code from the article but again my site title is duplicated!

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘my blog name is duplicated in title!?’ is closed to new replies.