WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Twenty Eleven Child h1 & h2 tags header.php (9 posts)

  1. blondie53185
    Member
    Posted 2 years ago #

    I have investigate the issue of having 2 h1 tags throughout the Twenty Eleven theme and have found these instructions by Kevin Muldoon. However, my child theme already calls 2 variables:

    • I have modified the code to replace/remove all the standard header images from the template per this post.
    • I already have a line of code in my header.php that instructs the entire <hgroup> to not display on 2 particular pages.

    I am having trouble figuring out where/how to modify Kevin's code from his blog post listed above for my situation.

    Here is an excerpt of my header.php file:
    [Code moderated as per the Forum Rules. Please use the pastebin]

    I am very good at following instructions but unfortunately, do not know any php coding. Any help is greatly appreciated!

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Do not edit the Twenty Eleven theme. It is the default WordPress theme and having access to an unedited version of the theme is vital when dealing with a range of site issues. Create a child theme for your changes.

  3. blondie53185
    Member
    Posted 2 years ago #

    Hey Esmi - I do have a child theme! The files contained in it are:

    • footer.php
    • functions.php
    • header.php
    • index.php
    • style.css

    Sorry I didn't make this clear in my initial post.

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    First of all, you should be aware that the views expressed on Kevin Muldoon's article as, by no means, definitive. When W3C were talking about 1 H1 per page, they were talking about a static page that covered only a single topic - not a list of Posts. There is no blanket rule here. Each site has to be judged on a case-by-case basis.

    However, if you wish to implement the kind of structure that Kevin suggests, you need to create a customised version of content.php in your child theme. If you intend to make use of Post Formats, you'll also need custom copies of most (if not all) of the other content-xx.php files

  5. blondie53185
    Member
    Posted 2 years ago #

    Thanks for pointing out that Kevin's information is more for static page sites and not those containing a blog as well. I'm still concerned because I am receiving an error in "SEO Doctor" addon for Firefox that I have 2 h1 tags - on the bulk of my pages. The main blog page has 4 h1's because of the title of each post.

    What do you feel would be the most beneficial route for me to take in this situation as far as gaining the best SEO? My site can be found at http://ezonevirtualservices.com

    Thanks!

  6. esmi
    Forum Moderator
    Posted 2 years ago #

    I am receiving an error in "SEO Doctor" addon for Firefox that I have 2 h1 tags - on the bulk of my pages

    That isn't an error. And in the context of a blog, is of highly debatable importance.

  7. blondie53185
    Member
    Posted 2 years ago #

    Do I understand that your opinion is to leave the layout as is?

  8. esmi
    Forum Moderator
    Posted 2 years ago #

    Well, put it this way, unless you want to get into customising most of the theme templates, you could leave it as is and you should not suffer any real negative SEO effects. Especially with only a few posts per page. And this is from someone who tends to be rather pedantic and downright picky about semantic HTML and logical heading structures.

  9. activ_x
    Member
    Posted 2 years ago #

    Here's an issue I've been having with seo doctor for firefox...
    My blog's header.phpo file has H1 tags for the name of the blog which, invariably describes the entire theme of the blog.

    However, each individual post, as in single.php file, came with H2 tags (kubrik theme), and I had to change these (being title of each individual post, totally unrelated to the name in Header.php) to H1 tags.

    Now, my confusion, seo wise is, what's the correct format, should the H1 tags which merely describe the main page, be used to canvas all posts, or should such a blog have 2H1 tags, one for the header referencing the main blog post, and other H1 tags for each individual single post?

    By the way, my blog only shows one post per page, instead of the continuous nature of posts all on one page.

    Would really appreciate feedback on this..

Topic Closed

This topic has been closed to new replies.

About this Topic