WordPress.org

Ready to get started?Download WordPress

Forums

my blog name is duplicated in title!? (27 posts)

  1. adsleeblythe
    Member
    Posted 11 months ago #

    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!

  2. esmi
    Forum Moderator
    Posted 11 months ago #

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

  3. adsleeblythe
    Member
    Posted 11 months ago #

    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 :)

  4. esmi
    Forum Moderator
    Posted 11 months ago #

    Try:

    <title><?php is_front_page() ) bloginfo('name');
    else wp_title(''); ?></title>
  5. adsleeblythe
    Member
    Posted 11 months ago #

    Thanks esmi,

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

  6. esmi
    Forum Moderator
    Posted 11 months ago #

    Sorry - my bad. Try:

    <title><?php if( is_front_page() ) bloginfo('name');
    else wp_title(''); ?></title>
  7. adsleeblythe
    Member
    Posted 11 months ago #

    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!

  8. esmi
    Forum Moderator
    Posted 11 months ago #

    <title><?php if( is_front_page() ) :
    bloginfo('name');?>  | <?php bloginfo('description');
    else: wp_title(''); ?></title>
  9. adsleeblythe
    Member
    Posted 11 months ago #

    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.

  10. esmi
    Forum Moderator
    Posted 11 months ago #

    What was the syntax error?

  11. wvasko
    Member
    Posted 11 months ago #

    Are you using Yoast WordPress SEO?

  12. adsleeblythe
    Member
    Posted 11 months ago #

    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

  13. adsleeblythe
    Member
    Posted 11 months ago #

    BTW, I am using a child theme of Fluxipress.

  14. esmi
    Forum Moderator
    Posted 11 months ago #

    I can't see an obvious syntax error.

  15. wvasko
    Member
    Posted 11 months ago #

    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.

  16. adsleeblythe
    Member
    Posted 11 months ago #

    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!

  17. esmi
    Forum Moderator
    Posted 11 months ago #

    how did you sort it out?

    That was a completely, unrelated, issue.

    Have you actually tried running the updated theme ?

  18. wvasko
    Member
    Posted 11 months ago #

    Ok, in Yoast WP SEO, titles&metas, I've checked first box: "force rewrite titles"

  19. adsleeblythe
    Member
    Posted 11 months ago #

    esmi, my theme is updated to the latest version. Could it be possible that this is a bug in dreamweaver?

  20. esmi
    Forum Moderator
    Posted 11 months ago #

    Well, I've gone over and over the last snippet I suggested and I can't see any error in it. Is that code snippet now running on your site? If so, is there anything in your site's error log?

  21. adsleeblythe
    Member
    Posted 11 months ago #

    yes, the snippet you suggested is currently running on my site and now the screen is blank!

    Where can i see my site's error log?

    Thanks

  22. adsleeblythe
    Member
    Posted 11 months ago #

    And wvasko, thanks for your suggestion. If I use Yoast WP SEO I will take that into consideration.

  23. adsleeblythe
    Member
    Posted 11 months ago #

    esmi, checking the site error log now...I have managed to access my host control panel.

  24. adsleeblythe
    Member
    Posted 11 months ago #

    Ok, I have just enabled 'show php error messages' in my control panel. I'll get back to you when I know.

  25. adsleeblythe
    Member
    Posted 11 months ago #

    esmi, this is the following error message

    Parse error: syntax error, unexpected $end in /customers/9/3/a/adamleeblythe.co.uk/httpd.www/wp-content/themes/fluxipress-child/header.php on line 81

    Line 81 in my header.php is:

    <div id="main" class="wrap clear">

    Any suggestions?

  26. esmi
    Forum Moderator
    Posted 11 months ago #

    Drop a copy of the file into the pastebin and post the pastebin url here.

  27. adsleeblythe
    Member
    Posted 11 months ago #

    Thanks esmi, Pastebin of header.php

Reply

You must log in to post.

About this Topic