Viewing 6 replies - 1 through 6 (of 6 total)
  • WordPress creates automatically two times a H1 tag on 1 page

    this is done by your currently used theme;

    one h1 is the site title, the code for this is in header.php;

    as your link seems to be referring to a static front page, look into page.php of the theme for the code of the second h1 – the page title.

    what exactly do you want to change it to?

    Thread Starter sandervds

    (@sandervds)

    The H1 tag in the menu bar I want to leave. The h1 top of each page I wish to remove or replace by H2 tag.

    apart from the home page or posts page, the theme is programmed to use a div for the site title; if this is ok with you, then edit header.php;

    find this line:

    <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>

    change it to:

    <?php $heading_tag = ( is_home() ) ? 'h1' : 'div'; ?>

    Thread Starter sandervds

    (@sandervds)

    I have found this line :

    <h1 id=”logo”>/” title=”<?php bloginfo(‘name’); ?>”><?php bloginfo(‘name’); ?></h1>

    Need I change this into : <?php $heading_tag = ( is_home() ) ? ‘h1’ : ‘div’; ?> ?

    if you find this line:

    <h1 id="logo"><a href="<?php echo get_option('home'); ?>/" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>

    you could change it to:

    <div id="logo"><a href="<?php echo get_option('home'); ?>/" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></div>

    this will need reformatting of the site title; add this to style.css:

    div#logo { font-size: 30px; line-height: 1.2; margin: 0; }

    make backup copies of the existing theme files before editing;

    afterwards, re-evaluate the seo effects of the changes.

    Thread Starter sandervds

    (@sandervds)

    Thanks alchymyth, I have done the changes. I hope it will be good and solved my SEO problem.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘automatically two times a H1 tag on 1 page’ is closed to new replies.