Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / General Questions / Change one sidebox's title to <h2> not <h3>

Change one sidebox's title to <h2> not <h3>

Started by creamcrackers on 26 Mar 2012, 8:00 PM · Views: 2,356

Results 1 to 14 of 14
26 Mar 2012, 8:00 PM
#1
creamcrackers avatar

creamcrackers

Zen Follower

Join Date:
May 2009
Posts:
228
Plugin Contributions:
1

Change one sidebox's title to <h2> not <h3>

Hi

In one of my sideboxes (top left) I want to change it so the title is a H2 tag not an H3.

Since every ZC template I can find puts the text in the top left sidebar before any of the other text areas on the page.. this is a very important spot for SEO. It is one of the first places Google looks for keywords. I would like to further emhasise that area by changing the default h3 tag (sidebar title) to an H2

So.. how can i "hack" ZC so i can manually put in a title there with my choice of Tag (h2)

Still its not ideal because then the H2 tag shows before the H1 tag in the main content..but anyway.

What I am trying to do, by means of changing this and doing some other hacks - to show certain keyword rich text sideboxes on relavent pages. Turning them off and on for different pages.

26 Mar 2012, 8:51 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Change one sidebox's title to <h2> not <h3>

You don't need to hack up your site's code to improve your page ranking. Many Zen Cart sites rank at or near the top for their niches with standard code and great content. The best thing you can do is to write good relevant content in the category/product descriptions and other main content areas. Google in particular is trying very hard to find and promote good content above anything else, to make their users more satisfied with their search results.

26 Mar 2012, 10:21 PM
#3
creamcrackers avatar

creamcrackers

Zen Follower

Join Date:
May 2009
Posts:
228
Plugin Contributions:
1

Re: Change one sidebox's title to <h2> not <h3>

gjh42:

You don't need to hack up your site's code to improve your page ranking. Many Zen Cart sites rank at or near the top for their niches with standard code and great content. The best thing you can do is to write good relevant content in the category/product descriptions and other main content areas. Google in particular is trying very hard to find and promote good content above anything else, to make their users more satisfied with their search results.

Thanks - yes but my shop is selling flowers for delivery.

Nobody searches for "12 red rose bouquet send in singapore"

They search for "flowers singapore" etc

So .. seo for the products and categories isnt really useful to me.

I want to prioritise the EZ pages as I have a lot of quality SEO text in there targeting keywords.

Also I want to H2 a text box (blank sidebox mod) that shows on index page only.. because that is where my primary keywords i am targetting for my site as a whole will go... in a text box at upper left.

And for ever EZ page i will have a different text box showing in the top left. I think this will help my SEO no end... Google now rates content "above the fold"

Thanks

26 Mar 2012, 10:26 PM
#4
creamcrackers avatar

creamcrackers

Zen Follower

Join Date:
May 2009
Posts:
228
Plugin Contributions:
1

Re: Change one sidebox's title to <h2> not <h3>

creamcrackers:

Thanks - yes but my shop is selling flowers for delivery.

Nobody searches for "12 red rose bouquet send in singapore"

They search for "flowers singapore" etc

So .. seo for the products and categories isnt really useful to me.

I want to prioritise the EZ pages as I have a lot of quality SEO text in there targeting keywords.

Also I want to H2 a text box (blank sidebox mod) that shows on index page only.. because that is where my primary keywords i am targetting for my site as a whole will go... in a text box at upper left.

And for ever EZ page i will have a different text box showing in the top left. I think this will help my SEO no end... Google now rates content "above the fold"

Thanks

Ideally i would also remove all the <h3> tags on the other sideboxes too and replace them with <p> Its not necessary to have so many <h3> on a page... its better to have <h...> tags with your keywords in them.. not things like <h3>Categories</h3> or <h3>Information</h3> Has no SEO benefit at all and most likely takes importance away from other <h... tags on your page that do have the keywords in them

Google does like lots of quality content.. but shop owners shouldnt need to be writing articles. Bloggers write articles, Jouros write articles why should shop owners write articles? You are right.. but seems a bit crazy to me. I have put a wordpress blog on my site in a subfolder and ive used magpie rss to grab the feed from it and post snippets of its content onto the front page of my shop. New content, updated recently.. but actually i seem to have a DROP is SEO as a result of this. I think my blog pages are seeping Google juice and relavence away from my shop.

27 Mar 2012, 12:56 AM
#5
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Change one sidebox's title to <h2> not <h3>

We have many clients getting to page one of Google on both generic and specific keyphrases. All using UN-ALTERED zencart installs.

One client gets EVERY SINGLE PRODUCT in the top 3 on Google - and for some products gets Google #1, #2 and #3 .

As Glenn Herbert says, there is no need to hack away at the core code. Proper descriptive content - and particularly product names which populate the title tag and the H1 tag on product info pages - is really all you should be focusing on.

20 years a Zencart User

27 Mar 2012, 1:01 AM
#6
creamcrackers avatar

creamcrackers

Zen Follower

Join Date:
May 2009
Posts:
228
Plugin Contributions:
1

Re: Change one sidebox's title to <h2> not <h3>

I know but im a bit of a weird person and like to do things a bit differently :bigups:

27 Mar 2012, 1:15 AM
#7
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Change one sidebox's title to <h2> not <h3>

So .. seo for the products and categories isnt really useful to me.

I want to prioritise the EZ pages as I have a lot of quality SEO text in there targeting keywords. In that case, yes, write good content for the ez-pages ("other main content areas").

I doubt it will make any difference to Google, but if you really want to change the top left sidebox heading to an <h2>, edit /includes/templates/your_template/common/tpl_box_default_left.php. Change```php

<h3 class="leftBoxHeading" id="<?php echo str_replace('_', '-', $box_id) . 'Heading'; ?>"><?php echo $title; ?></h3> ``` to ```php <?php $heading_tag = ($box_id == 'your_top_left_box')? 'h2': 'h3'; ?> <<?php echo $heading_tag ?> class="leftBoxHeading" id="<?php echo str_replace('_', '-', $box_id) . 'Heading'; ?>"><?php echo $title; ?></<?php echo $heading_tag ?>> ``` Change your_top_left_box to whatever the id of that box is for you.
27 Mar 2012, 1:21 AM
#8
creamcrackers avatar

creamcrackers

Zen Follower

Join Date:
May 2009
Posts:
228
Plugin Contributions:
1

Re: Change one sidebox's title to <h2> not <h3>

Great thanks for your help!

27 Mar 2012, 1:22 AM
#9
creamcrackers avatar

creamcrackers

Zen Follower

Join Date:
May 2009
Posts:
228
Plugin Contributions:
1

Re: Change one sidebox's title to <h2> not <h3>

gjh42:

In that case, yes, write good content for the ez-pages ("other main content areas").

I doubt it will make any difference to Google, but if you really want to change the top left sidebox heading to an <h2>, edit /includes/templates/your_template/common/tpl_box_default_left.php. Change```php

<h3 class="leftBoxHeading" id="<?php echo str_replace('_', '-', $box_id) . 'Heading'; ?>"><?php echo $title; ?></h3> ``` to ```php <?php $heading_tag = ($box_id == 'your_top_left_box')? 'h2': 'h3'; ?> <<?php echo $heading_tag ?> class="leftBoxHeading" id="<?php echo str_replace('_', '-', $box_id) . 'Heading'; ?>"><?php echo $title; ?></<?php echo $heading_tag ?>> ``` > Change your_top_left_box to whatever the id of that box is for you.

Thanks.. how can i change all sideboxes titles to <p> except for the top left one!

Cheers

27 Mar 2012, 1:23 AM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Change one sidebox's title to <h2> not <h3>

Make only that change for now, and let us know after a reasonable time if it made any difference in your search engine results. I'm betting it won't have any significant effect.

Change 'h3' to 'p' in the code above. You would have to do the same for tpl_box_default_right.php.

Note that this actually makes your markup LESS meaningful and relevant, as those box headings are really headings, not paragraphs.

27 Mar 2012, 1:24 AM
#11
creamcrackers avatar

creamcrackers

Zen Follower

Join Date:
May 2009
Posts:
228
Plugin Contributions:
1

Re: Change one sidebox's title to <h2> not <h3>

Ive got 4 main top left boxes... each appears on a different page

One appears on the index page only.

The other 3 appear with one showing on 3 different ez pages.

I want them to have an H2. All other boxes to be <p> at all times

They will always appear at the top left

27 Mar 2012, 1:29 AM
#12
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Change one sidebox's title to <h2> not <h3>

Sorry, I don't have the spare time to work out the coding for you for that much unnecessary stuff. Maybe someone else will.

27 Mar 2012, 2:18 AM
#13
creamcrackers avatar

creamcrackers

Zen Follower

Join Date:
May 2009
Posts:
228
Plugin Contributions:
1

Re: Change one sidebox's title to <h2> not <h3>

OK no probs thanks

19 Apr 2012, 2:47 PM
#14
anjordan77 avatar

anjordan77

Zen Follower

Join Date:
Jun 2006
Location:
Midlothian, Virginia, United States
Posts:
110
Plugin Contributions:
0

Re: Change one sidebox's title to <h2> not <h3>

SITE/includes/templates/template_default/common/tpl_box_default_left.php

Look for h3 which will be in there twice, and replace h3 with p

Do the same with the
SITE/includes/templates/template_default/common/tpl_box_default_right.php

I believe this should do it, as it did it for me just now :)

Now to remove the h2 tag from product prices for me...