Missing H1 heading

Posted in: Newspaper
Post count: 361

I had the problem that the H1 heading did show up duplicate. So I deactivated the H1 heading on the Logo in the tagdiv-composer. But now, I don’t have any H1 Heading in the mobile theme and when I want to test the homepage in the desktop-version it is not possible, because only the mobile versions shows up. What can I do, do have a H1 Heading in the mobile as in the desktop version? Can I do it for the mobile version in wp-content-plugins-td-composer-mobile-header? And where I have to do it for the desktop-version? wp-content-plugins-td-composer?

Greetings Kathrin

Post count: 35449

Hi,

Please note that all changes made in theme files will be lost when you’ll update the theme.
Also I just checked your website and you have one h1 for desktop and mobile -> https://i.imgur.com/FFVurVm.png using the responsive version.
If this is not what you mean, please provide some more details.

Thank you for your understanding!

Post count: 361

Dear Calin, this is not exactly what I mean. The H1 Heading in the desktop-version works. I have deactivated in the composer the H1 on the logo to avoid duplicate content. For the Mobile version, I use the mobile plugin and the therefore a different header which is just available in the mobile version. Here is no H1 defined. I always get the message from the seo-tool urgent do to –> add a H1 header.

When I make some changes in the theme-panel, the mobile version of the theme always changes to responsive version of the desktop. In this case the H1 Header is correct. But I want to use the mobile plugin header….

Greetings Kathrin

Post count: 35449

Hi,

Indeed on mobile theme plugin there is no h1 on homepage, if you want you can add it on this file wp-content/plugins/td-composer/mobile/parts/header-menu.php

Hope this will help you!
Thank you!

Post count: 361

Ok, the code of this document is:

<div id=”td-header-menu”>
<div id=”td-top-mobile-toggle”><i class=”td-icon-font td-icon-mobile”></i></div>
<div class=”td-main-menu-logo”>
<?php
locate_template(‘parts/logo.php’, true, false);
?>
</div>
<!– Search –>
<div class=”td-search-icon”>
<i class=”td-icon-search”></i>
</div>
</div>

What and where I should put the code snippet that “Topfgartenwelt – Gartenblog | Foodblog | Familienblog” is a H1 and what kind of code I have to add that after clicking on an article the title tag of the article gets an H1 and not the title of the homepage?

Would one of this codes be a solution? Or do you have another one?

<?php $headertag = ( is_front_page() ) ? ‘h1’ : ‘h6’; ?>
<hgroup>
<<?php echo $headertag; ?> class=”site-title”>” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”><?php bloginfo( ‘name’ ); ?></<?php echo $headertag; ?>>
<h2 class=”site-description”><?php bloginfo( ‘description’ ); ?></h2>
</hgroup>

or

<?php
is_front_page() ? $title_tag = ‘h1’ : $title_tag = ‘div’;
?>
<<?php echo $title_tag; ?> id=”site-title”>
/”><?php bloginfo( ‘name’ ); ?>
</<?php echo $title_tag; ?>>

Thank you

Greetings Kathrin

Post count: 35449

Hi,

Yes, the code can work, if you want to set more specific the h1 tag you can do it here -> wp-content/plugins/td-composer/mobile/parts/logo.php in this way you can set the tagline_text ->

Thank you!

Post count: 361

Which one of the two codes can work? And does the code only show the H1 on the homepage and not on the postpages?

Greetings Kathrin

Post count: 35449

Hi,

I just find a better solution please replace the code from this file wp-content/plugins/td-composer/mobile/parts/logo.php with the code from this pastebin this will check if is homepage and will add an h1 only on homepage -> https://i.imgur.com/RDb52Md.png

But please note that all these settings in theme files will be lost after you’ll make a theme update.

Hope this will help you!
Thank you!

Post count: 361

Thank you very much! It works perfectly!

Greetings Kathrin

Post count: 35449

I’m glad that I was able to help you!
Have a nice day!

Viewing 10 posts - 1 through 10 (of 10 total)
The forum ‘Newspaper’ is closed to new topics and replies.