I figure I'd pass this along for anyone else wanting to know how to do this. If you want to change the format of the default :: character separator follow these instructions.
I don't know why X-Cart choose a double colon for a separator in their title tags it does not make much sense SEO-wise. The best format for the title tag is:
Product Name - Category | Site Name. That is the best format for search engine according to current studies (reference:
Best SEO Practices by SEOmoz).
So now on to the details... to change the format follow these steps:
For Page Titles like this: Product Name - Category - Site Name- Open up the file include/templater/plugins/function.get_title.php
- Go to line 107.
- On this line you will find implode(' :: ', $tmp))); at the end of the line of code change the :: out for the - character or whatever you want. Now this will make your title tags look like this Product Name - Category - Site Name
For Page Titles like this: Product Name - Category | Site Name- First make sure you have the setting in Main page :: General settings :: SEO options :: Page title format set to Product name :: Category name :: Shop name
- Open up the file include/templater/plugins/function.get_title.php
- Go to line 107.
- Replace that entire line
$title = str_replace(array("\n", "\r"), array("", ""), trim(implode(' :: ', $tmp)));
With the following:
PHP Code:
############################################
# Title Tag Hack By RocketMarketingInc.com #
############################################
$title = '';
$titlePartCount = count($tmp);
$icount = 1;
foreach($tmp as $titlePart)
{
if($icount!=1) { $title .= ($icount!=$titlePartCount) ? ' - ' : ' | '; }
$title .= $titlePart;
$icount++;
}
$title = str_replace(array("\n", "\r"), array("", ""), trim($title));
That should do it! If you have any questions let me know.
And if you need any other help with SEO on your site feel free to contact me at
RocketMarketingInc.com or the contact link in my sig.
__________________
.
Contact me about modifying x-cart for your needs.
Xcart Gold versions:
4.5.x, 4.4.3, 4.4.1, 4.4.0, 4.3.1
4.1.10, 4.1.9, 4.1.8
Add-on modules:
Featured Product Carousel
and other various mods I've built