No matter what WordPress theme you use, there are basic HTM5 elements and rules to accept as they’re. Or, you’ll risk your site with SEO best practices, especially with Google and Bing. In the last couple of months, I noticed that X Theme which is a great WordPress design by Themeco use multiple H1 tags per blog page including the posts, and pages.
Why only one single H1 tag per page?
There are many discussions and articles about this subject, some experts say, you can use more than one H1 tag on your website. In reality, they are completely wrong, your theme must have only one single H1 Tag par page. You don’t need to waste your time with explanations, instead, here is what Bing says about the subject:
Only one <H1> tag per page
Here is a screenshot about that from the Bing webmaster guidelines page:
That’s clear and you have the reason to fix the problem you have with ay theme. There are many web design who talks about SEO when they can destroy your business because of these mistakes.
Take it simple, when you duplicate the H1 title tag in your blog post or website page, your site will suffer even a little with Bing SEO. The Bing webmaster guidelines show clearly that you should accept that rule.
Google and Bing understand your web page by scanning its title first, then, the structure of your HTML code helps. As a crawler, the Googlebot can easily understand what your post is about from on a single title, then, use H2 for your article sections.
By doing more than One H1, you’ll not help your site and it may or may not be affected by SEO. So, don’t take the risk, and make things clear for visitors and search engines at once.
Remove the duplicate tag
Without wasting your time, here is how to remove the duplicate H1 tag from your X Theme.
To begin, make sure you have a theme backup and also access to FTP or SFTP as you need to upload a file.
We need to remove the default theme usage for the site name and what tag it allocates to it. All you have to do is create a file called
_brand.php and paste the following code on it:
<?php // ============================================================================= // VIEWS/GLOBAL/_BRAND.PHP // ----------------------------------------------------------------------------- // Outputs the brand. // ============================================================================= $site_name = get_bloginfo( 'name' ); $site_description = get_bloginfo( 'description' ); $logo = x_make_protocol_relative( x_get_option( 'x_logo' ) ); $site_logo = '<img src="' . $logo . '" alt="' . $site_description . '">'; ?> <a href="<?php echo home_url( '/' ); ?>" class="php x_brand_class(); ?>" title=""> <?php echo ( $logo == '' ) ? $site_name : $site_logo; ?> </a>
Please copy the whole code, then, upload the file to the following exact location in your x child theme (Please remember it’s the child them and not the parent one)
The file should be in the global folder.
For beginners, here is how to locate that folder and upload or create the file I’m talking about. First, login to your cPanel account, or use any FTP software like FileZilla or Cyberduck. Then, login and click on File Manager in cPanel or just login with FTP and you’ll get the public HTML directory, click on it and you’ll be able to see your entire site files.
Then, access your theme by clicking on wp-content.
Now, you’ll get more files, just find themes and double-click on it to open.
Of course, you can find your X Theme and also, the child theme. If you’re not using a child them, you should, you can download it from your member area, and it will speed up your theme as well.
When you open the x-child, you’ll get the following files when you should open the one called framework as this screenshot:
The next step, you’ll find views, open it, and click on Global:
That’s it, that folder should be empty by default, now, you need to upload the file you’ve created there. Or, you can use the file manager to create a new file, then, edit it by pasting the above PHP code on it and save the changes.
That’s it, you successfully modified the way the theme uses the title tag. Clear your WordPress cache and then visit any post and you’ll see your theme uses H1 tags only once per page. I hope this helped.