Support » Themes and Templates » Duplicate H1 tags

  • Oli2k

    (@oli2k)


    I was wondering if anyone would help. It looks like my blog has 2 sets of H1 tags which of course is really bad for SEO

    Can anyone tell me how to resolve this?

    Theme – Blogolife
    Blog – http://www.happylaptops.co.uk

Viewing 3 replies - 1 through 3 (of 3 total)
  • Valeriu Tihai

    (@valeriutihai)

    HTML5 allowing multiple h1 tags per page!

    loughcorrib

    (@loughcorrib)

    Can you change them in file, as for seo the jury is still out. As per val it’s html5 and passed bt w3. Have just read a bit this week on it seems some are under opinion it’s acceptable providing its in different content.
    Back to mission can you change it in code ?

    I changed the title and description code to this:

    <?php if (is_front_page()) { ?>
    	<h1 id="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?> - <?php bloginfo('description'); ?>" rel="home"><?php bloginfo('name'); ?></a></h1>
    	<p id="site-description"><?php bloginfo('description'); ?></p>
    	<?php } else { ?>
    	<p id="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?> - <?php bloginfo('description'); ?>" rel="home"><?php bloginfo('name'); ?></a></p>
    	<p id="site-description"><?php bloginfo('description'); ?></p>
    	<?php } ?>

    I also had to add the bottom two lines of this code to the stylesheet:

    #site-title {
    	margin: 0px 0 10px 0;
    	text-shadow: 1px 2px 1px #c5d1d9;
    	font-size:  30px;
    	line-height: 45px;
    	font-family: 'Oswald', sans-serif
    }

    I also changed my homepage to use an article … so there is no double h1 on my homepage.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Duplicate H1 tags’ is closed to new replies.