WordPress.org

Ready to get started?Download WordPress

Forums

Duplicate H1 tags (4 posts)

  1. Oli2k
    Member
    Posted 2 years ago #

    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

  2. Valeriu Tihai
    Member
    Posted 2 years ago #

    HTML5 allowing multiple h1 tags per page!

  3. loughcorrib
    Member
    Posted 2 years ago #

    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 ?

  4. DeskCoder
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic