Hi,
I was wondering why there is a h1 tag within my logo? It contains my site’s title. It seems that this problem is with newest Newspaper theme, because with 6.7 everything is fine. It’s a bad feature, since I like to add all headings myself manually. And how can I remove it since having 2 H1 tags isn’t good.
Regards,
Arturs
Hello kambyz,
If you want to turn off the H1 tag for your logo, please notice that you will have to do it only from the code source. Please try to comment it out this snippet of the code from the logo-text.php core file lie this -> http://screencast.com/t/6jZxtG2aVVEN Please notice that this feature has been designed for the better result in SEO.
Thanks for your understanding!
Hello kambyz,
So, please notice that this type of feature is useful when you are not using the page builder plus page title template. Before this, you will have to add it manually on the page, using some text blocks with H1 text. This request was from several users and we have found this solution and have implemented in our theme. Please notice that the SEO Yost using the same method to display the H1 tag for official site, like this -> http://screencast.com/t/4wYyNEDgNJmf
If you want to get rid of this H1 logo, you will have to follow the steps -> http://screencast.com/t/HkuuAayUyX4U ->> this is an example to the header style 1. So, if you are using the header style 3, you will have to make this change in header-style-3.php.
Thanks for your understanding!
Hey Catalin,
is there a solution to have the H1 on the logo only on the home page? For the rest of the pages visual composer is taking care of the H1. Unfortunately we can’t use any heading on the home page for the H1, so the logo is the only possibility.
Thanks
Hello DaveS,
Unfortunately, our theme does not have any such an option that allows you to keep the H1 tag for logo only for the homepage, sorry! Notice that if you want to remove the H1 for the logo you can do it from core files but the H1 will be deleted from the entire website and not only from the homepage, sorry!
Thanks for your understanding!
As is had the SEO issue: Here is a small workaround (that works for me). I just added an if case, to check for the right page. Maybe it could help you too Dave. đ
1. get the id for your home page (in my example below 335)
2. copy the logo-h1.php in your child-theme folder (if you are using the Child Theme Feature): /Newspaper-child/parts/header/logo-h1.php
3. change the following code in logo-h1.php:
if (!empty($td_customLogoR)) { // if retina
if($td_use_h1_logo === true) {
if (is_page(335)) {
echo '<h1 class="td-logo">';
}
else {
echo '<div class="td-logo">';
}
};
?>
<a class="td-main-logo" href="<?php echo esc_url(home_url( '/' )); ?>">
<img class="td-retina-data" data-retina="<?php echo esc_attr($td_customLogoR) ?>" src="<?php echo $td_customLogo?>" alt="<?php echo $td_logo_alt ?>"<?php echo $td_logo_title ?>/>
<span class="td-visual-hidden"><?php bloginfo('name'); ?></span>
</a>
<?php
if($td_use_h1_logo === true) {
if (is_page(335)) {
echo '</h1>';
}
else {
echo '</div>';
}
};
} else { // not retina
if (!empty($td_customLogo)) {
if($td_use_h1_logo === true) {
if (is_page(335)) {
echo '<h1 class="td-logo">';
}
else {
echo '<div class="td-logo">';
}
};
?>
<a class="td-main-logo" href="<?php echo esc_url(home_url( '/' )); ?>">
<img src="<?php echo $td_customLogo?>" alt="<?php echo $td_logo_alt ?>"<?php echo $td_logo_title ?>/>
<span class="td-visual-hidden"><?php bloginfo('name'); ?></span>
</a>
<?php
if($td_use_h1_logo === true) {
if (is_page(335)) {
echo '</h1>';
}
else {
echo '</div>';
}
};
}
}
edit: I have some formatting errors here and don’t know how to do it better. You should format the code.
Also note with modern HTML and document markup, you can have more than one H1 tag in different areas of the page, such as the explicit header area and expicit article area. With modern code mark-up, HTML5, etc. all modern search engines understand the difference and there is no SEO penalty. Meaning, the H1 in the header area identifies that the logo is the primary header element related to the site vs any of the navigation links, and is primary link, such as back to home page. In the article area, the H1 must match the title for the page/post as close as possible, and should be the only H1 within the article section for best placement.
Some people freak out about this without actually exploring how modern markup works. So, in case you see this in forum search – chill, baby, chill ! đ
Yoast does use this for his homepage but not for individual pages. http://prntscr.com/fmrkxk
It’s cool that you are thinking about how to improve SEO but it’s clear that multiple H1 tags especially having “logo” as H1 on multiple pages will screw SEO more than it will help.
An option to enable/disable it without messing with the code would be more than welcome
Cheers
Ok so following Catalin’s advice to change logo-h1.php to logo.php this is the situation on my Header-style-5.php file. http://prntscr.com/fmruov
When I remove this h1 the logo is removed completely.
Appreciate any advice here.
Thanks
Yoast is not the de facto expert about SEO, only one purveyor, and NOT always right. We’ve been doing it since 1995, long before the Yoast crew ever saw a web browser; we were the #1 result on Yahoo for a decade under “keyword optimization.” But whatEVAH. I give advice, not everybody gets it. It does *not* hurt your SEO either way, as the CONTENT, and the title, description first 185 characters, sub heads, outbound organic links, inbound organic links, referential content, and ORIGINAL CONTENT are what help SEO.
Again, search engines KNOW the difference between modern DOM markup for sections of pages, and KNOW what h1 does where. A logo h1 in header container is not treated as superior to h1 tag for content in article container.
SEO = “search engine optimization” — not “website optimization” — so, Google, Bing, Yandex, etc., all know how to read modern HTML5/DOM/markup.
Just FYI anybody reading this thread later.
Matt Cutts addressed this in video in 2009, although he is no longer with Google.
Google webmaster central help forum has addressed this multiple times, including this answer on this same topic from Dec. 2016:
We don't treat HTML5 differently & having multiple H1 tags on a page is fine. Be reasonable when using them, use them where they make sense. There's definitely no penalty for using H1s.
Don’t assume the sky is falling just because some ancient article tells you some bad info about pre-HTML5 era code and modern DOM usage. Modern code is very very different from 20th century webdev. Modern code has markup and sections to define a header from a footer, from an article section, etc. (for instance, Apple uses the article section on iOS to make an ‘easy to read’ version of page available and for SIRI to read).
Feel free to change stuff if you feel strongly about it, but don’t presume that Google, Bing, Yandex etc. care one way or another. Usage on the logo is correct in this context as it’s unrelated to the content SEO for the actual page content.
Hope that helps somebody as this comes up on every theme forum these days.
Kind of like the people who still freak about about the srcset attribute
Well I as a person with 7 plus years of experience in SEO I can tell you for a fact that two h1 will move stuff from the first page to the third. I happened to my by mistake. This implementation is not smart at all. now I will have to change this every time I update if I forget I will loose my ranks. not cool. I would like to get a response from the devs. you gusy need to add a simple solution for this.
