Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

H1 Tags for Product Title ?


sheepiedog

Recommended Posts

Hi,

 

I have quite a few meta tag contributions installed, but Bing is saying in the webmaster tools that I should have <H1> tags.

This should be the product title I would imagine. Is there some way to insert code so that the product title is automatically the <H1> tag ?

(Of course still retaining the styleof the text (font size, color etc) in the stylesheet.)

 

How is everyone else handling <H1> tags ?

 

Can someone help me out or point me in the right direction ?

 

 

------

These are the meta tag contributions I have installed - quite old as my store was started in 2004)

Dynamic product meta tags Cont 1505 and Category Meta Tags 1176 and Header Tags Controller v2 Contribution 207

Link to comment
Share on other sites

oh super, thats sounds perfect! I am a bit unsure as to where and how and dont want to make a mistake. I am hoping you would be so kind as to point out where and how I would make this adjustment ?

 

I have isolated the code I think I need to change below.

Where would I add the H1 tags in the right place for the product title? and will the stylesheet still retain the fonts styles or do I need to make adjustments for the font settings here as well ?

 

(I have seen H1 tags make Huge text and I dont want that to happen)

 

 

 

 <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
    <td><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
    <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
	    <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
		    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		    <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
		    <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
	    </table></td>
	  </tr>
    </table></td>
  </tr>
<?php
 } else {
   $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
   $product_info = tep_db_fetch_array($product_info_query);
   tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");
   if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
  $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
   } else {
  $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
   }
   if (tep_not_null($product_info['products_model'])) {
  $products_name = $product_info['products_name'] . '<br /><span class="smallText">[' . $product_info['products_model'] . ']</span>';
  $products_price .= '<br /><span class="smallText"> </span>';
   } else {
  $products_name = $product_info['products_name'];
   }
?>
  <tr>
    <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
	    <td class="pageHeadingProduct" valign="top"><?php echo $products_name; ?></td>
	    <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>
	  </tr>
    </table></td>
  </tr>
  <tr>
    <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
    <td class="main">
<?php
   if (tep_not_null($product_info['products_image'])) {
?>
	  <table border="0" cellspacing="0" cellpadding="2" align="right">
	    <tr>
		  <td align="center" class="smallText">

Link to comment
Share on other sites

Thank you so much ! It did make the text hugely large. I amended the code to read below - can you see any potential problems with the way I did it or is that ok ?

 

<td class="pageHeading" valign="top"><h1 style="display:inline"><font size="+1"><?php echo $products_name; ?></font></h1></td>

Link to comment
Share on other sites

oh - spoke too soon. The code I put is no good with the inline style

 

I changed it to this

<h1><font size="+1"><?php echo $products_name; ?></font></h1>

 

but now it moves my description and picture down the page. I am so sorry, to be such a bother - can you advise how to keep the page layout the same and still include the h1 tags ?

Link to comment
Share on other sites

Hi

 

I think your previous version would work with a tweak try something like:

<h1 style="font-size:13px"><?php echo $products_name; ?></h1>

or

<h1 style="font-size:large"><?php echo $products_name; ?></h1>

 

add display:inline if you need it by

 

<h1 style="font-size:large; display:inline;"><?php echo $products_name; ?></h1>

Link to comment
Share on other sites

I have quite a few meta tag contributions installed, but Bing is saying in the webmaster tools that I should have <H1> tags.

 

These are the meta tag contributions I have installed - quite old as my store was started in 2004)

Dynamic product meta tags Cont 1505 and Category Meta Tags 1176 and Header Tags Controller v2 Contribution 207

You can only have one meta tags addon working at one time since they all output the titles and meta tags so my quess is they are not installed correctly. The Header Tags Controller addon, unless it was a very early version, added the h1 code as part of the installation. But none of those addons will help you much. I suggest you install Header Tags SEO, which will fix the h1 problem and add much more for SEO work. It will also add canonical meta tag, which you need to have nowadays.It didn't exist when those addons were active and is one of the reasons continuing to use them is a mistake.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Thanks everyone - I will try those suggestions. (fingers crossed that I dont mess something up :-)

 

Re; Jack_mcs - the header tags controller contibution I have installed is ancient - but i installed all those contibutions when I first started my store - back in 2004 and perhaps back then I reversed some and installed new ones - but my store was much simpler then and easier for me to work with.

When viewing the source code - I dont have duplicate meta tags.

 

In 9 years, I added a lot of different contributions. Unfortunately I most probably should change to a different seo package - my problem is, I was able to add the original contributions with much anxiety and finger crossing - but to now reverse that at this point and install a different contribution and know what coding was changed prior and change it correctly is a bit beyond my skill level and stress level :-) but I know I have to do something - theres a lot of things I really should have changed - but I would have to hire someone and from my experience from trying to hire a coder before- its very very expensive and that is unfortunately - money that I dont have right now and so I am stuck - so I really appreciate everyone here who has tried to help me - I really do :-)

Link to comment
Share on other sites

To be clear, I wasn't saying you would have duplicate tags, though that would be possible. The code for the tags is added to the head section of the files so if you installed one addon and changed the head section for it and then installed another and changed the header section again, only the last one will work properly. The first one installed will still setup the data to be used but it wouldn't have any way to display it.

 

Header Tags SEO was built upon Header Tags Controller, though it has been almost completely rewritten now. It is, in my opinion, the best of the meta tags scripts for SEO purposes but there are easier ones to install. In the least, I suggest you try one of those. They won't help as much with SEO but they would be better than what you have now. You would also need to install the canonical meta tag addon since I don't think the other meta tag addons have one built-in. But it is a simple install too.

 

I don't know what you consider very expensive but it might be less than you think to have it done for you. This is the most important part of your shop so it isn't something you want to just ignore.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...