h1 Problem

by 5 replies
6
I just looked at the source code of a page published on my WP site.

There are two h1 tags: it has (1) a h1 tag for the title of the whole site (this same site title h1 tag is on every page) and (2) a h1 tag for the page title (every page has a unique title). The site title h1 tag is automatically inserted by WP and the page title h1 is inserted by my page code. Both h1's are in the body code.

Isn't two h1 tags per page bad (maybe, very bad) for SEO?

Any suggestions on how to correct the problem so that each page has one unique applicable h1 tag?

Thanks!
#search engine optimization #problem
  • You need to get in the templates and edit the code,
    Try header.php, index.php, or style.css use Ctrl+f on your keyboard and type h1 in the search box for each template and see what you find.

    You can change the h1 to another h tag, but it will make the text smaller (as per the css)
    Or you could use a <p> tag with a custom css style class/tag.
  • No. That extra h1 is a gift from the clueless primate who programmed your theme. WordPress only does what the theme instructs.

    Yes, this is the way to do it. Just clarifying a bit.

    When you've changed the element to something else (say, div class="sitetitle") open the CSS file. Find the style for that h1 element, add the new element, and copy h1's style for your new element.
    • [1] reply
    • Thanks Tim and nettiapina. The page title really needs to be the h1. The site title should not be the h1 tag on every page. So, as you suggested and as I was afraid of, the only solution is to modify the CSS, which I will attempt to do.

      Thanks again!
  • Please explain in detail what is H1 Tag Problem in code so that I can explain it in detail..
    • [1] reply


    • Funniest bot message I've seen today.

Next Topics on Trending Feed

  • 6

    I just looked at the source code of a page published on my WP site. There are two h1 tags: it has (1) a h1 tag for the title of the whole site (this same site title h1 tag is on every page) and (2) a h1 tag for the page title (every page has a unique title). The site title h1 tag is automatically inserted by WP and the page title h1 is inserted by my page code. Both h1's are in the body code.