Shopify themes, liquid, logos, and UX
Good Evening All,
I have just added a "Featured Product" section to my homepage (Flex Theme) and the product's title has become a H1 heading, so now my website has 2 H1 headings. Does anyone know why this would happen and how to fix it.
TIA
Google has stated that having a few H1 tags on a page doesn't really hurt SEO as long as they provide useful information to the user.
This is a good article on it - https://www.stanventures.com/blog/multiple-h1-tags/
Thankyou for this article, but this info doesn't really help with answering the question I posed. I appreciate your time though.
Hey @MrsMacca,
As you mentioned after adding the featured product section, your homepage now has 2 H1s, it is because the theme default structure adds the product title in an H1 tag. To remove the additional H1 tag coming from the featured product section you can follow the below steps:
1. Duplicate your current live theme before making any changes.
Refer to this doc: https://help.shopify.com/en/manual/online-store/themes/managing-themes/duplicating-themes
2. Open the theme file editor, by navigating to Online store > Themes > Click the three dots (...) > Edit code.
3. Search for the "Featured Product" file in the sections folder. It can be by the name of "featured-product.liquid".
4. Look for the code that is responsible for showing the product's title, the code might look something like as shown in the code below:
<h1 class="product-title title">{{ product.title }}</h1>
----------------------------------------------------------------------
<h1 class="product-title title">{{ product.title | escape }}</h1>
5. Update the code by replacing the opening H1 (<h1>) tag with H2 tag (<h2>) and closing H1 tag (</h1>) with closing H2 tags (</h2>). Such that your updated come becomes like:
<h2 class="product-title title">{{ product.title }}</h2>
----------------------------------------------------------------------
<h2 class="product-title title">{{ product.title | escape }}</h2>
6. Done? Now try previewing the theme file to verify if the additional H1 tag is removed from the homepage.
One important point to note is that these adjustments could bring potential design issues to the layout, like reduced font size and boldness for the heading, which you might need to fix.
If you are not comfortable editing the code yourself, you should hire a Shopify developer, who will help you with these changes.
I hope this helps!
Regards,
Abhishek from Swym
Thankyou, I will give this a go
Unfortunately there is nothing that looks like this in that section
Hey @MrsMacca,
That's really weird.
Can you please look for a possible file named "featured_product.liquid"?
If not can you please search for files by the name "featured" on your theme code directory under the sections folder and share a screenshot with me? As I did in the screenshot below:
Maybe then I can see the names of the file and tell you the name of the file that you need to edit?
Regards,
Abhishek from Swym
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024