The MU forums have moved to WordPress.org

Duplicate Meta Title & Description in <?php wp_head(); ?> (6 posts)

  1. ljmyers
    Member
    Posted 14 years ago #

    Hi there,

    I'm using wpmu 2.9.1 and have ran into a little snag. When looking at the source code for the header on the main blog, I am getting two meta titles and two meta descriptions. The first is because I have hard coded it into the theme as such . . .

    <title><?php wp_title('|', true, 'right'); ?><?php bloginfo('name'); ?></title>
    <meta name="desciption" content="<?php wp_title('',true,'right'); ?> bla bla bla bla at <?php bloginfo('name'); ?>" />

    Further down in the header's source code there is a second meta title and description which are coming from the wp_head hook. This only occurs on the main blog. It is not a problem in any of the test blogs I have created on the site. I have also tested with a couple different themes where I have added the same code as above to make sure this is not the issue.

    The obvious answer, I know, is to simply delete the code I have added myself but when I do that and depend on the meta title generated by the wp_header hook, it does not work as well, only outputting the site url for the title, I think this is due to the wp generated meta being so far down in the header and not nearer to the top? Plus, they just don't look as nice. I have tried the all in one SEO plugin but it doesn't seem to help.

    Any advice is welcome.

    Thanks, Lana

  2. ljmyers
    Member
    Posted 14 years ago #

    My apologies,

    Just to make myself clear . . .

    This issue only occurs in the main blog and regardless of how the theme is coded.

  3. andrea_r
    Moderator
    Posted 14 years ago #

    Got any plugins adding that to the head? that's my guess.

  4. ljmyers
    Member
    Posted 14 years ago #

    thanks for the suggestion Andrea . . . I'll check into it.

  5. ljmyers
    Member
    Posted 14 years ago #

    I went through and deactivated each plugin, then checked the source code. That isn't the issue :(

    Any other ideas welcomed.

  6. andrea_r
    Moderator
    Posted 14 years ago #

    flip it to the default theme as well as remove all mu-plugins. just as if it were a clean install.

About this Topic

  • Started 14 years ago by ljmyers
  • Latest reply from andrea_r