H 1 Problem-
-
Since day 1, when my website has been analyzed, I have 2 \”Header 1\”\’s. I have tried to go in to \”customize\” and just delete the site title text, but what ever tool I analyze my site with, says I have 2 Header 1\’s,(my site name) on all pages. This must be a code/html problem. Even though I am a newbie, I have already gone in to fix code, so I can probably fix this if you give me the code and tell me EXACTLY where to put it. Thanks.
http://www.plexuschangeyourlife.com
-
There’s nothing wrong with having more than one <header> tag. It’s a new HTML5 tag. What analysis tool is giving you an error? The W3 Validator doesn’t report any errors related to multiple header elements on your site.
Thank you SO much for replying. This is an SEO problem. Having 2 H1 on a page is not optimal. Some say it is a ding to my google rank.
This is what I see, using SEOquake, but this is seen on others as well.
Headings
H1 H2 H3 H4 H5 H6
2 4 5 0 0 0<H1>: Plexus- Change Your Life
<H1>: Plexus Home
<H2>: Get Your Body Back in Sync!
<H2>: WELCOME TO PLEXUS CHANGE YOUR LIFE !
<H2>: “The Pink Drink That Makes You Shrink”That is from my home page. Here is from another page:
Headings
H1 H2 H3 H4 H5 H6
2 2 5 0 0 0<H1>: Plexus- Change Your Life
<H1>: Arthritis
<H2>: Get Your Body Back in Sync!
<H2>: PLEXUS SLIM ARTHRITISIt seems that the <H1>: Plexus Change Your Life appears on all pages, and each title for each page has it’s own H1, as it should.
I need to get rid of that <H1>: Plexus Change Your Life.
Maybe somewhere in my php.headers html?
I hope this makes sense?
(more)
OK, thanks for the clarification. I saw the word “header” in your original message and thought you were referring to the <header> tag.
Yes, the header.php file writes the h1 site-title to the header. However, instead of editing the theme’s header.php file directly, you should create a child theme and make a copy of the header.php file in your child theme folder. The reason why a child theme is recommended is that if the Twenty Twelve theme ever gets upgraded because of a bug fix or security patch, your changes will be lost.
So you would then make the change in the copy of header.php. Here is the line that you are looking for:
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>You need to change the h1 in both the opening tag at the beginning of the line, and the closing tag at the end of the line. The site title isn’t even visible on your site, so you can change it to whatever other tag you want. I’m not sure if that was intentional or not; I’ve read that if the site title isn’t visible on a site, it could negatively affect rankings.
Yes, I do need to create a child theme. I have been avoiding that, but I see why I should. I recently messed up my site, and was able to restore it with a back-up, but I did not know that upgrades can make me lose my changes (I assume you mean my html changes).
On the issue of changing the code you provided, I get where I should do this, but I do not understand “change it to whatever other tag you want”. I just don’t want to have two H1 headers, only the page title as H1.
On the issue of my site title not being visible, no it’s not intentional. I have gone into “appearance”-“customize”- “site title &tag line”, entered the text, and it doesn’t show. I have put the site title and tag line in the top of my homepage content to compensate.
If you can help me with those specifics, I will probably find someone to fix this for me. I will show them the info you have provided and make sure it gets done correctly.
Thank you again! I very much appreciate your help!
but I do not understand “change it to whatever other tag you want”.
Just change the h1 to h2. I originally said “whatever other tag you want” because the site title is hidden, so it really didn’t matter what tag you used. But since you actually want to display the site title, change it to h2. Or you can change it to another header tag that’s not being used, like h4 or h5, and just change the font-size of the site-title class using CSS so it still displays larger.
As far as your site title goes, it looks like you found out what was causing it to be hidden, a rule that set the position to absolute. Congratulations!
Well, I took this thread and my laptop to a guy who fixed the problem! Yipee! I think I have a google-viable website, at least a major improvement from before. Thank you!
I will be checking out your link to the child theme info. The changes were made in my parent, so I will save this thread.
I am having other issues as well, that I have seen others
have—“missing:author” and “missing:update”, in Structured Data in Webmaster Tools. I have seen ways for to fix this, but I won’t do it until I get my child theme set up.
I also up UpDraft plug-in for back-up. It works! But if my theme gets an update, then if I have to restore my site/data at some future time, does that mess up the theme update?
Just curious. Not important, like having a functional website…:-)Thanks again! I owe you a beer!
But if my theme gets an update, then if I have to restore my site/data at some future time, does that mess up the theme update?
I’ve never used UpDraft, but from what I read on their page, it looks like you can choose what to restore. So if a theme gets updated, you can restore just your data (although a theme update won’t affect your data anyway, so really no need to do a restore on a theme update). But if you do restore your theme from the backup, that will overwrite the theme update. So that’s the point behind creating a child theme: an update to the parent theme won’t destroy any changes you made through the child.
I will say that since Twenty Twelve is a couple of years old, the chances of it being updated because of a feature update are less than the newer themes (Twenty Thirteen or Twenty Fourteen). However, the Twenty ## themes are maintained by the WordPress development team, and they are fairly responsive to any security patches that need to be installed, so it’s not out of the question that the theme may be updated at some point in the future.
Thanks again!
This has all been very helpful. I just installed a plug-in, Child Theme Configurator, and it will let me select the files “header.php” and whatever else I want to save, with the changes I have previously made, into the new child theme.
So if this plugin works, it will be fantastic, because it certainly has been easy! Fingers crossed…. 🙂
The topic ‘H 1 Problem-’ is closed to new replies.