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 on 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 any theme. There are many web designers who talk 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.
- Read also: best WordPress landing page plugin
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 back up and also access to FTP or SFTP as you need to upload a file.
We need to remove the default theme used 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 into 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 theme 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, log in to your cPanel account, or use any FTP software like FileZilla or Cyberduck. Then, log in and click on File Manager in cPanel or just log in 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 into 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.