You must remove the is_front_page condition so that the header does not change to h2. Your programmer made a mistake when he put it there.
<?php if ( is_front_page() ) : ?>
<h2 class="entry-title">
<?php the_title(); ?>
</h2>
-
This reply was modified 5 years, 6 months ago by
evgeny17.
Hi @evgeny17
The site title has the h1 tag on the home page of the site on the condition if it set as static front page or not. So if the front page is set to static then, the page title gets h2 tag to properly compliant with SEO.
Hope this clears the confusion!
Regards,
ThemeGrill
I don’t need the h1 that is in the site name. I have hidden the title and title on the site. So I need to have h1 in the page body. Otherwise, it spoils SEO.
The code below is hidden on the site in the theme settings, but it is still displayed in the code
<!-- #header-logo-image -->
<div id="header-text" class="screen-reader-text">
<h1 id="site-title">
-
This reply was modified 5 years, 6 months ago by
evgeny17.
evgeny17 me too have hidden he title and title on the site so what do you propose to fix the issue please i mean what can we do until they fix it ?
Apparently, the developers are not going to fix anything in this direction. You can simply delete the line in the code that is responsible for displaying the site name and description. You can also try to replace h1 with something else in it.
-
This reply was modified 5 years, 6 months ago by
evgeny17.
The developers of the theme were just too lazy to think through the logic in which the main page will be static. They thought that the main page would only have an archive of records. But this became a problem for people, because they had to manually delete the code responsible for displaying the site name above the logo with h1.
I also want to note that the following code is displayed on the posts page near the logo:
<div id="header-text" class="screen-reader-text">
<h3 id="site-title">
This strongly contradicts SEO, since h3 in this case is displayed earlier than h1 post title.
-
This reply was modified 5 years, 6 months ago by
evgeny17.
Hi @evgeny17 @redaxxa
We’ve already made best practices of the theme for SEO purposes, in the content that it will help each and every user. And if you want to modify them as you need for your site then, you can create a child theme: https://themegrill.com/blog/tutorial-creating-wordpress-child-theme/ and manage accordingly.
Hope you understand!
Regards,
ThemeGrill