Back to Community

How to Fix Duplicate H1 Tags in the Botiga Theme

40 threads Sep 10, 2025 ThemeBotiga

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