Jump to content

H1 Tags On Category Pages


Recommended Posts

I am using Traffic Travis foe seo and have discovered some issues with H1 tags on my category pages.

 

  1. It tells me I have too many H1 tags. I haven't added any H1 tags as I was of the belief it uses the page title as the H1, so why do I have more than one H1 tag
  2. It tells me my H1 tag is too long. My page title which becomes my H1 tag is "4wd Recovery" it seems to be picking up the text on the right side of the page that says "there are no products in this category. How do I stop thi

Page in question is https://www.tuffcountry.com.au/17-4wd-recovery

 

Any help would be greatly appreciated.

 

Cheers

Brent Roberts

www.tuffcountry.com.au

Link to comment
Share on other sites

hi!
I only see one "H1" but, as you say, the text is "4wd Recovery  There are no products in this category."
You must edit the category.tpl of your theme and place the </h1> on the right place.

 

Now:

<h1 class="page-heading product-listing">

<span class="cat-name">4wd Recovery </span>

<span class="heading-counter">There are no products in this category.</span>

</h1>
 
The correct:

<h1 class="page-heading product-listing">

<span class="cat-name">4wd Recovery </span></h1>

<span class="heading-counter">There are no products in this category.</span>

 
Regards!
Link to comment
Share on other sites

The code looks a little different than your code:

<h1 class="page-heading{if (isset($subcategories) && !$products) || (isset($subcategories) && $products) || !isset($subcategories) && $products} product-listing{/if}"><span class="cat-name">{$category->name|escape:'html':'UTF-8'}{if isset($categoryNameComplement)} {$categoryNameComplement|escape:'html':'UTF-8'}{/if}</span>{include file="$tpl_dir./category-count.tpl"}</h1>

Where should I move the end H1 to?

Cheers
Brent Roberts
www.tuffcountry.com.au

Link to comment
Share on other sites

Hi!

Try this:

<h1 class="page-heading{if (isset($subcategories) && !$products) || (isset($subcategories) && $products) || !isset($subcategories) && $products} product-listing{/if}"><span class="cat-name">{$category->name|escape:'html':'UTF-8'}{if isset($categoryNameComplement)} {$categoryNameComplement|escape:'html':'UTF-8'}{/if}</span></h1>{include file="$tpl_dir./category-count.tpl"}

 

Regards!

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

Hi!

Try this:

<h1 class="page-heading{if (isset($subcategories) && !$products) || (isset($subcategories) && $products) || !isset($subcategories) && $products} product-listing{/if}"><span class="cat-name">{$category->name|escape:'html':'UTF-8'}{if isset($categoryNameComplement)} {$categoryNameComplement|escape:'html':'UTF-8'}{/if}</span></h1>{include file="$tpl_dir./category-count.tpl"}

 

Regards!

</h1> works

Link to comment
Share on other sites

  • 1 month later...

Hi

 

I have a question about h1 tags. How can I have it like this example my website is https://www.iowagoatmilksoap.com/ when you look at the source I want this to have h1 tag

<title>Iowa Goat Milk Soap by Sherrys Lavishing Soap and Bath</title>

than on this page to have h1 tag https://www.iowagoatmilksoap.com/en/50-bath-products source code

<title>HANDMADE BATH AND BODY PRODUCTS FOR SALE - MADE IN IOWA - Iowa Goat Milk Soap by Sherrys Lavishing Soap and Bath</title>

 

another page

<title>BODY WASH - HANDCRAFTED BODY WASH BY IOWA GOAT MILK SOAP - Iowa Goat Milk Soap by Sherrys Lavishing Soap and Bath</title>

Thanks

 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...