Add H1 tag to website Logo on Homepage of Astra theme

Want to add the H1 tag to website logo in the Astra theme for SEO reasons? While inner pages have their page title as H1 tag, you may want to wrap logo with H1 tag for homepage only when using Astra theme. This can be achieved via custom code.

Code Snippet: Add H1 tag to Homepage Logo

In the WordPress Dashboard, go to Appearance > Theme Editor and open the functions.php file of your Astra child theme. Then add the following code at the end. Alternatively, you can use code snippets plugin for adding custom code.

 

Share this Tutorial

Leave a Comment