Jump to content

Sub-Category & H1 Issue


Ajax1080

Recommended Posts

Hi guys,

 

Got a quick question that would be a big help if anyone knows the answer!

 

Basically, I'm setting up a site for a clothing retailer where the clothing categories are split by gender and the sub-categories from there (so Men's T-Shirts, for instance). However, on the drop down navigation for Men's, it labels everything in their full category name. So when you hover over "Men's", you see "Men's T-Shirts, Men's Trousers, Men's Underwear" and so on - which looks really messy.

 

Another thing is that we want the H1 of the sub-category pages to read "Men's T-Shirts" - or whatever it might be - for SEO purposes, as if it's just "T-Shirts" it won't be as strong a signal to Google.

 

So basically what I'm wondering is: can you edit the H1 of a sub-category page independent of the sub-category name? Or can you edit the drop down menu to take away the "Men's" from the display of each sub-category? 

 

Would really appreciate any help!

Edited by Ajax1080 (see edit history)
Link to comment
Share on other sites

Yes, you can enter a separate name and meta title on the category editor. Just enter "T-Shirts" in the "Name" field and "Men's T-Shirts" in the "Meta title" field.

 

Hi Rocky,

 

Thanks for the suggestion. I just gave it a go, but that only seems to change the meta title of the page for search - not the actual title of the page.

 

So, for instance, if we change the sub-category to "T-Shirts" within the category of "Men's", if we change the meta title to "Men's T-Shirts", the H1 (and so the title of page as well) will still be "T-Shirts", but the name of the page according to my browser tab - and if I was to look for it via Google - would be "Men's T-Shirts".

 

Ideally, we'd also like the H1 of the page to be "Men's T-Shirts" as well, whilst keeping that initial change so not everything on the drop down menu comes up as "Men's [sub-category name]".

 

Doesn't sound like there's an easy solution?

Link to comment
Share on other sites

Try changing line 72 of category.tpl inside your theme from:

		<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>

to:

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

This should use the meta-title instead of the category name on category pages.

Link to comment
Share on other sites

Try changing line 72 of category.tpl inside your theme from:

		<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>

to:

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

This should use the meta-title instead of the category name on category pages.

 

Ah, perfect, will give that a go!

 

Appreciate your help on this

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...