Skip to:
Content
Pages
Categories
Search
Top
Bottom

H1 Tags and SEO


  • bmg1227
    Participant

    @bmg1227

    I’m thinking that the header.php should be recoded to display the site title as an <h1> only on the front page and not on any other pages – when you’re viewing a single post, the site title and the post title come up as <h1> tags and that’s probably not so kosher to spiders.

Viewing 5 replies - 1 through 5 (of 5 total)

  • r-a-y
    Keymaster

    @r-a-y

    I did this for my own child theme.

    But all the other BP pages (directory pages, profile pages, etc.) use the <h2>. It would be too much work to edit every single template file to modify the <h2> to <h1>.


    bmg1227
    Participant

    @bmg1227

    All that is required in the header.php file is to use conditional code saying if front page, wrap site title in h1 tags else h4 and then set the post/page titles by default to h1, which is what they should be IMO.

    So submit an enhancement ticket on http://trac.buddypress.org and a patch if can.


    r-a-y
    Keymaster

    @r-a-y

    @Bmg1227

    I wouldn’t use <h4> because the structure of the page wouldn’t make sense.

    <h4>Site title</h4>

    <h2>Secondary page item</h2>

    etc.

    I’d use a <div> or <span> tag instead.

    div and span elements are non semantic grouping or aggregating elements, as such they are not suitable for content directly. ‘site title’ would need to be one of either heading or paragraph tag

    Using a primary heading tag such as H1 for ‘site title’ a string that is the same across the site or pages is a waste of the most important document outline tag.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘H1 Tags and SEO’ is closed to new replies.
Skip to toolbar