For several week now I've been having problems with the meta tags on my home page.
I am using 1.3.7
The title and keywords are fine but the description is just a mixture of the title and keywords whereas I want to say something more specific. I have followed these instructions:
1. open your /includes/languages/english/YOURTEMPLATE/meta_tags.php
2. add a new line anywhere between the <?php and the closing ?> which says:
PHP Code:
define('MY_IMPORTANT_HOME_PAGE_DESCRIPTION', 'blah blah blah blah');
(substituting blah blah blah with your preferred home-page-only description, naturally)
3. edit /includes/modules/YOURTEMPLATE/meta_tags.php
around line 138 you have:
PHP Code:
define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . str_replace(array("'",'"'),'',strip_tags(HEADING_TITLE)) . SECONDARY_SECTION . KEYWORDS);
change that to:
PHP Code:
define('META_TAG_DESCRIPTION', MY_IMPORTANT_HOME_PAGE_DESCRIPTION);
4. Submit to search engines and watch closely
This is an extract from my two files:
1. includes/modules/classic/meta-tags.php
f (isset($_GET['manufacturers_id'])) {
$sql = "select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "'";
$manufacturer_metatags = $db->Execute($sql);
if ($manufacturer_metatags->EOF) {
define('META_TAG_TITLE', TITLE . TAGLINE);
define('META_TAG_DESCRIPTION', MY_IMPORTANT_HOME_PAGE_DESCRIPTION);
define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . str_replace(array("'",'"'),'',strip_tags(HEADING_TITLE)));
} else {
define('META_TAG_TITLE', str_replace('"','', $manufacturer_metatags->fields['manufacturers_name'] . PRIMARY_SECTION . TITLE . TAGLINE));
2. includes/ languages/english/clssic/meta tags.php
<?php
define('MY_IMPORTANT_HOME_PAGE_DESCRIPTION', 'An enchanting boutique packed with gorgeous childrens clothes and fancy dress costumes for special occasions, parties, birthdays, weddings, Christmas, Halloween......or simply to have fun');
/**
* @package languageDefines
* @copyright Copyright 2003-2005 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: meta_tags.php 4273 2006-08-26 03:13:52Z drbyte $
*/
// page title
define('TITLE', 'Fairytale Fashions - Childrens Clothes and Fancy Dress Costumes');
// Site Tagline
define('SITE_TAGLINE', 'An enchanting boutique packed with gorgeous childrens clothes and fancy dress costumes for special occasions, parties, birthdays, weddings, Christmas, Halloween......or simply to have fun!');
// Custom Keywords
define('CUSTOM_KEYWORDS', 'Childrens Fancy Dress, Kids Fancy Dress, Childrens Dressing Up, Kids Dressing Up, Animal Fancy Dress, Kids Designer Wear, Kids Designer Clothes, Childrens Designer Clothes, Childrens Designer Wear, Fairy Dresses, Kids Skirts, Teenwear, Kids Clothes Online, Childrens Clothes Online, Ballerina Dresses, Nativity Costumes, Nursery Rhyme Costumes, Story Telling Costumes, World Book Day Costumes, Halloween Costumes, Kids Halloween Costumes, Bridesmaid Dresses, Flower Girl Dresses, T-shirts for Children, Childrens Disney Costumes, Kids Disney Costumes,');
Please can anyone see what is going wrong here - I have spent hours trying to fix this.
Thanks
Bookmarks