How to Fix Duplicate H1 Tags in the Botiga Theme
Content
Duplicate H1 tags are a common issue that can negatively impact your site's SEO. Based on community reports, this problem frequently occurs for users of the Botiga theme. This guide will explain why it happens and provide the most effective solutions to resolve it.
Why Duplicate H1 Tags Occur
The issue often stems from the theme's structure. The site title, which is often wrapped in an H1 tag, can be output in multiple locations within the theme's templates, such as in both the site header and a sticky header. Furthermore, if you manually add another H1 tag to your page's content (e.g., in a slider or a heading block), you can easily end up with multiple H1s on a single page.
Common Solutions
1. Identify the Source
Before applying a fix, use your browser's inspector tool (right-click on your page and select 'Inspect') to search for 'h1' and locate the exact elements causing the duplication. This will help you target the correct element with your solution.
2. Change a Heading's HTML Tag
If the duplicate H1 is coming from a plugin, like a slider (as seen in one case with the Site Origin Image Slider), the solution is to change the heading level within that plugin's settings. Check the settings of any page builder or slider plugins you are using and ensure they are not set to output H1 tags unnecessarily.
3. Use Custom CSS to Change the Tag
If you cannot change the tag from its source, you can use CSS to visually change its appearance and HTML structure. The following code can be added to Appearance > Customize > Additional CSS. This example changes a second instance of a site title H1 to an H2 tag.
.site-header .site-title { /* Targets the first H1 */ }
.sticky-header .site-title {
font-size: 2rem; /* Maintains visual size */
}
/* This CSS 'tricks' screen readers and bots into seeing it as an H2 */
.sticky-header .site-title {
display: block;
font-size: 2rem;
font-weight: bold;
}
/* Alternatively, use a more advanced method with classes */
4. Use a Filter Hook (Advanced)
For developers comfortable with code, the most robust method is to use a WordPress filter hook to modify the theme's output. This should be added to your child theme's functions.php file or via a code snippets plugin.
/**
* Change the sticky header site title tag from H1 to H2
* to resolve duplicate H1 issues.
*/
function botiga_change_sticky_header_title_tag( $tag ) {
if ( botiga_sticky_header() ) {
$tag = 'h2';
}
return $tag;
}
add_filter( 'botiga_site_title_tag', 'botiga_change_sticky_header_title_tag' );
Important: Always use a child theme when modifying theme files to prevent your changes from being overwritten by future updates.
Conclusion
Resolving duplicate H1 tags in Botiga typically involves investigating the source of the duplication and applying a targeted fix, either through plugin settings, CSS, or a custom filter hook. Addressing this issue is a positive step towards improving your website's SEO health and accessibility.
Related Support Threads Support
-
2 H1 tags were foundhttps://wordpress.org/support/topic/2-tags-were-found/
-
Logo Link to Main Websitehttps://wordpress.org/support/topic/logo-link-to-main-website/
-
Different sidebar for each categoryhttps://wordpress.org/support/topic/different-sidebar-for-each-category-2/
-
footerhttps://wordpress.org/support/topic/footer-210/
-
Quitar buscador (lupa) del tema Botigahttps://wordpress.org/support/topic/quitar-buscador-lupa-del-tema-botiga/
-
Botiga Contact Us pagehttps://wordpress.org/support/topic/botiga-contact-us-page/
-
Page Titlehttps://wordpress.org/support/topic/page-title-100/
-
Duplicate H1 Tagshttps://wordpress.org/support/topic/duplicate-h1-tags-3/
-
How to hide title of pages in Botiga theme ?https://wordpress.org/support/topic/how-to-hide-title-of-pages-in-botiga-theme/
-
ENABLE SIDEBAR BLOG PAGEhttps://wordpress.org/support/topic/enable-sidebar-blog-page/
-
Meta titlehttps://wordpress.org/support/topic/meta-title-9/
-
White Space after Headerhttps://wordpress.org/support/topic/white-space-after-header-2/
-
transparent header only in home pagehttps://wordpress.org/support/topic/transparent-header-only-in-home-page/
-
Duplicate H1Tagshttps://wordpress.org/support/topic/duplicate-h1tags/
-
Hide logout button in menu in Botiga themehttps://wordpress.org/support/topic/hide-logout-button-in-menu-in-botiga-theme/
-
Featured categories update on the mainhttps://wordpress.org/support/topic/featured-categories-update-on-the-main/
-
Theme image sizeshttps://wordpress.org/support/topic/theme-image-sizes/
-
Remove/Hide page tittle in shop page and category pagehttps://wordpress.org/support/topic/remove-hide-page-tittle-in-shop-page-and-category-page/
-
SHow category title and descriptionhttps://wordpress.org/support/topic/show-category-title-and-description/
-
Remove page tigkehttps://wordpress.org/support/topic/remove-page-tigke/
-
The width of the pagehttps://wordpress.org/support/topic/the-width-of-the-page-2/
-
How to add static text to home page?https://wordpress.org/support/topic/how-to-add-static-text-to-home-page/
-
How to remove the “noindex” taghttps://wordpress.org/support/topic/how-to-remove-the-noindex-tag/
-
Hide logo on front pagehttps://wordpress.org/support/topic/hide-logo-on-front-page/
-
White space after title removinghttps://wordpress.org/support/topic/white-space-after-title-removing/
-
Show header only on homepagehttps://wordpress.org/support/topic/show-header-only-on-homepage-2/
-
Transparent headerhttps://wordpress.org/support/topic/transparent-header-40/
-
Do not shot picture name in full-width modehttps://wordpress.org/support/topic/do-not-shot-picture-name-in-full-width-mode/
-
Blank white space under page title (Botiga)https://wordpress.org/support/topic/blank-white-space-under-page-title-botiga/
-
Hide “Homepage” title on the main pagehttps://wordpress.org/support/topic/hide-homepage-title-on-the-main-page/
-
category page description – how do i change it full widthhttps://wordpress.org/support/topic/category-page-description-how-do-i-change-it-full-width-2/
-
Hide top row in headershttps://wordpress.org/support/topic/hide-top-row-in-headers/
-
Change padding of page titlehttps://wordpress.org/support/topic/change-padding-of-page-title/
-
White Space after Title Removalhttps://wordpress.org/support/topic/white-space-after-title-removal/
-
Reducing white space between header image and header titlehttps://wordpress.org/support/topic/reducing-white-space-between-header-image-and-header-title/
-
space between header and bodyhttps://wordpress.org/support/topic/space-between-header-and-body-3/
-
Main Menu transparencyhttps://wordpress.org/support/topic/main-menu-transparency/
-
option to customize Brand Pagehttps://wordpress.org/support/topic/option-to-customize-brand-page/
-
Need to hide sidebar on home page onlyhttps://wordpress.org/support/topic/need-to-hide-sidebar-on-home-page-only/
-
Unable to hide sidebar on Blog Archiveshttps://wordpress.org/support/topic/unable-to-hide-sidebar-on-blog-archives/