Category Archives: OpenCart

Custom Title Tags for OpenCart

If you are concerned at all about SEO you won’t use OpenCart long before realizing that the out-of-the-box OpenCart software does not allow you to write page title tags that are different from the actual titles of your products. In the stock-version these two items are one and the same making it impossible to write custom title tags that look good in the search engines but don’t mess up the look and feel of your website.

The solution is actually very simple — and actually very FREE.

Just below the Meta Description field in the product admin area is the field for Meta Keywords. This tag has long been abandoned by the search engines so rendering it useless to us, until now.

Use that field in the admin area to enter all of your unique page title tags and then just do a slight modification to the header template and voila, custom title tags for OpenCart!

Here’s the code:

Edit is file: "/catalog/view/theme/YOURTHEME/template/common/header.tpl"

Replace this:

<?php echo $title; ?>

With this:

<?php if ($keywords) { echo $keywords; } else { echo $title; } ?>

Then, simply delete the useless meta keyword tag to keep things clean in the code.