Category Name Does Not Show In Page Title

Description

When you go to a category page your page title is something like " : Site Title - Tag Line".

To fix this open /catalog/includes/meta_tags.php.
Near line 184 find the following 3 lines;
define('META_TAG_TITLE', str_replace(array("'", '"'), "", $mt_categories['categories_name']) . PRIMARY_SECTION . TITLE . $web_site_tagline);
define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . str_replace(array("'", '"'), "", $mt_categories['categories_name']) . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . str_replace(array("'", '"'), "", $mt_categories['categories_name']));

Change to;
define('META_TAG_TITLE', str_replace(array("'", '"'), "", $mt_category['categories_name']) . PRIMARY_SECTION . TITLE . $web_site_tagline);
define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . str_replace(array("'", '"'), "", $mt_category['categories_name']) . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . str_replace(array("'", '"'), "", $mt_category['categories_name']));

Then around line 200 find the following 3 lines;
define('META_TAG_TITLE', str_replace(array("'", '"'), "", $mt_categories['categories_name']) . PRIMARY_SECTION . TITLE . $web_site_tagline);
define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . str_replace(array("'", '"'), "", $mt_categories['categories_name']) . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . str_replace(array("'", '"'), "", $mt_categories['categories_name']));

Change to;
define('META_TAG_TITLE', str_replace(array("'", '"'), "", $mt_category['categories_name']) . PRIMARY_SECTION . TITLE . $web_site_tagline);
define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . str_replace(array("'", '"'), "", $mt_category['categories_name']) . SECONDARY_SECTION . WEB_SITE_KEYWORDS);
define('META_TAG_KEYWORDS', WEB_SITE_KEYWORDS . str_replace(array("'", '"'), "", $mt_category['categories_name']));

Environment

None

Steps to reproduce

None

Assignee

Giles Marshall

Reporter

Scott Murphy

Labels

None

Severity

Minor

Components

Fix versions

Affects versions

Priority

Configure