Hi there,
thank you for your suggestion. We are constantly updating Olsen Light to provide the best practices for SEO and performance. We have your suggestion in mind for future updates.
For now you can easily remove in header.php in this
<h1><a href="<?php echo esc_url( home_url() ); ?>">
<?php if ( get_theme_mod( 'logo', get_template_directory_uri() . '/images/logo.png' ) ): ?>
<?php else: ?>
<?php bloginfo( 'name' ); ?>
<?php endif; ?>
</a>
</h1>
code the <h1> and </h1> tags.
Open the default editor and then navigate to the /themes/olsenlight/ folder to find the file.
If you decide to proceed with this modification I would suggest you create a child theme, copy over the files you are editing and make the modifications there. This will allow your changes to survive future theme updates. If you directly edit the theme’s files, all changes will be lost once you update.
Have a look at this guide to learn more about child themes and how to create one http://www.cssigniter.com/ignite/beginners-guide-child-themes/
Let me know if you need additional changes to adjust your SEO performance.
-
This reply was modified 5 years, 3 months ago by Fotis.
Hi Fotis,
Thanks a lot for your quick answer.
My link to Neil Patel’s article has been deleted due to moderation, here it is again, hope it’ll work. It contains very valuable informations for anyone interested about h1 tags relating to SEO optimization.
Thanks for your suggestions, here’s what I did:
-
Creating child theme. I personally ended up using a plugin that worked perfectly. In my case I used Child Theme Generator (compatible with latest version of wordpress which is 5.0.2 at the time of this post)
-
Copy paste header.php from olsen-light folder to the new olsen-light-child folder.
Then edit the one (header.php) from the new olsen-light-child folder.
Then delete h1 tag, for me it was something like this:
<h1 itemprop="name">
And
</h1>
-
Replacing the h2 tags by h1 tags in the post titles by doing this:
Copy and paste single.php from olsen-light folder to the new olsen-light-child folder.
Then edit the one (single.php) from the new olsen-light-child folder.
Then change h2 tag to h1 tag, for me it looked like this:
<h2 class="entry-title" itemprop="headline">
<?php the_title(); ?>
</h2>
To change to:
<h1 class="entry-title" itemprop="headline">
<?php the_title(); ?>
</h1>
I personally also removed the h3 tag from the footer (footer.php) using the same method.
Et voilà !
-
This reply was modified 5 years, 3 months ago by christofu.
-
This reply was modified 5 years, 3 months ago by christofu.
-
This reply was modified 5 years, 3 months ago by christofu.
Thank you so much for sharing!
Let me know if you need additional help on this.
-
This reply was modified 5 years, 3 months ago by Fotis.