Psychic, Spiritual & New Age Business Owners Forum™

Full Version: Add Metatags
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi everyone,

I'm just getting my site sorted, but i would like to know how you add metatags. I found metatags.php in includes - languages - english, but it has nothing in it. An easy step by step guide would be very helpful if anyone can provide one.
it has nothing in it at all - that makes no sense as you have metatags on your site and thats the only place the metas would be hiding - are you opening the file in notepad (that's best).

geoff-g Wrote:
it has nothing in it at all - that makes no sense as you have metatags on your site and thats the only place the metas would be hiding - are you opening the file in notepad (that's best).


I was trying with dreamweaver and getting nothing. However i tried with notepad as you suggested, and got this:

<?php
/**
* @package languageDefines
* @copyright Copyright 2003-2007 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 6668 2007-08-16 10:05:09Z drbyte $
*/

// page title
define('TITLE', 'Black Dragons Gift Shop');

// Site Tagline
define('SITE_TAGLINE', '');

// Custom Keywords
define('CUSTOM_KEYWORDS', 'pagan, wiccan, shop, online shopping');

// Home Page Only:
define('HOME_PAGE_META_DESCRIPTION', '');
define('HOME_PAGE_META_KEYWORDS', '');

// NOTE: If HOME_PAGE_TITLE is left blank (default) then TITLE and SITE_TAGLINE will be used instead.
define('HOME_PAGE_TITLE', ''); // usually best left blank


// EZ-Pages meta-tags. Follow this pattern for all ez-pages for which you desire custom metatags. Replace the # with ezpage id.
// If you wish to use defaults for any of the 3 items for a given page, simply do not define it.
// (ie: the Title tag is best not set, so that site-wide defaults can be used.)
// repeat pattern as necessary
define('META_TAG_DESCRIPTION_EZPAGE_#','');
define('META_TAG_KEYWORDS_EZPAGE_#','');
define('META_TAG_TITLE_EZPAGE_#', '');

// Per-Page meta-tags. Follow this pattern for individual pages you wish to override. This is useful mainly for additional pages.
// replace "page_name" with the UPPERCASE name of your main_page= value, such as ABOUT_US or SHIPPINGINFO etc.
// repeat pattern as necessary
define('META_TAG_DESCRIPTION_page_name','');
define('META_TAG_KEYWORDS_PAGE_page_name','');
define('META_TAG_TITLE_PAGE_page_name', '');

// Review Page can have a lead in:
define('META_TAGS_REVIEW', 'Reviews: ');

// separators for meta tag definitions
// Define Primary Section Output
define('PRIMARY_SECTION', ' : ');

// Define Secondary Section Output
define('SECONDARY_SECTION', ' - ');

// Define Tertiary Section Output
define('TERTIARY_SECTION', ', ');

// Define divider ... usually just a space or a comma plus a space
define('METATAGS_DIVIDER', ' ');

// Define which pages to tell robots/spiders not to index
// This is generally used for account-management pages or typical SSL pages, and usually doesn't need to be touched.
define('ROBOTS_PAGES_TO_SKIP','login,logoff,create_account,a ccount,account_edit,account_history,account_history_info,acc ount_newsletters,account_notifications,account_password,addr ess_book,advanced_search,advanced_search_result,checkout_suc cess,checkout_process,checkout_shipping,checkout_payment,che ckout_confirmation,cookie_usage,create_account_success,conta ct_us,download,download_timeout,customers_authorization,down _for_maintenance,password_forgotten,time_out,unsubscribe,inf o_shopping_cart,popup_image,popup_image_additional,product_r eviews_write,ssl_check');


// favicon setting
// There is usually NO need to enable this unless you need to specify a path and/or a different filename
// define('FAVICON','favicon.ico');

?>

If you can tell me what to do with this i would be eternally grateful.

Many thanks for your responce.

make a copy of the file first, then again open with note pad and for page title you just change and add words in the area I have put in bold below, do not delete the two single quotation marks ' and ' on either side.

// page title
define('TITLE', 'Black Dragons Gift Shop - so add more text here etc');

BUT, remember google only counts the first 55-60 characters of the meta title all beyond that will be ignored.

To get your own description and keywords you have to insert your text between the two quotation marks, but KEEP the quotation marks ie '':

// Home Page Only:
define('HOME_PAGE_META_DESCRIPTION', 'add text here');
define('HOME_PAGE_META_KEYWORDS', 'add text here');

ALSO remember that the page description is ignored after around the 18th word by google.

then save it, re-upload it and jobs done Phew

geoff-g Wrote:
make a copy of the file first, then again open with note pad and for page title you just change and add words in the area I have put in bold below, do not delete the two single quotation marks ' and ' on either side.

// page title
define('TITLE', 'Black Dragons Gift Shop - so add more text here etc');

BUT, remember google only counts the first 55-60 characters of the meta title all beyond that will be ignored.

To get your own description and keywords you have to insert your text between the two quotation marks, but KEEP the quotation marks ie '':

// Home Page Only:
define('HOME_PAGE_META_DESCRIPTION', 'add text here');
define('HOME_PAGE_META_KEYWORDS', 'add text here');

ALSO remember that the page description is ignored after around the 18th word by google.

then save it, re-upload it and jobs done Phew


Excellent. Thank you all for your help.

black-dragon Wrote:

geoff-g Wrote:
it has nothing in it at all - that makes no sense as you have metatags on your site and thats the only place the metas would be hiding - are you opening the file in notepad (that's best).


I was trying with dreamweaver and getting nothing. However i tried with notepad as you suggested, and got this:

<?php
/**
* @package languageDefines
* @copyright Copyright 2003-2007 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 6668 2007-08-16 10:05:09Z drbyte $
*/

// page title
define('TITLE', 'Black Dragons Gift Shop');

// Site Tagline
define('SITE_TAGLINE', '');

// Custom Keywords
define('CUSTOM_KEYWORDS', 'pagan, wiccan, shop, online shopping');

// Home Page Only:
define('HOME_PAGE_META_DESCRIPTION', '');
define('HOME_PAGE_META_KEYWORDS', '');

// NOTE: If HOME_PAGE_TITLE is left blank (default) then TITLE and SITE_TAGLINE will be used instead.
define('HOME_PAGE_TITLE', ''); // usually best left blank


// EZ-Pages meta-tags. Follow this pattern for all ez-pages for which you desire custom metatags. Replace the # with ezpage id.
// If you wish to use defaults for any of the 3 items for a given page, simply do not define it.
// (ie: the Title tag is best not set, so that site-wide defaults can be used.)
// repeat pattern as necessary
define('META_TAG_DESCRIPTION_EZPAGE_#','');
define('META_TAG_KEYWORDS_EZPAGE_#','');
define('META_TAG_TITLE_EZPAGE_#', '');

// Per-Page meta-tags. Follow this pattern for individual pages you wish to override. This is useful mainly for additional pages.
// replace "page_name" with the UPPERCASE name of your main_page= value, such as ABOUT_US or SHIPPINGINFO etc.
// repeat pattern as necessary
define('META_TAG_DESCRIPTION_page_name','');
define('META_TAG_KEYWORDS_PAGE_page_name','');
define('META_TAG_TITLE_PAGE_page_name', '');

// Review Page can have a lead in:
define('META_TAGS_REVIEW', 'Reviews: ');

// separators for meta tag definitions
// Define Primary Section Output
define('PRIMARY_SECTION', ' : ');

// Define Secondary Section Output
define('SECONDARY_SECTION', ' - ');

// Define Tertiary Section Output
define('TERTIARY_SECTION', ', ');

// Define divider ... usually just a space or a comma plus a space
define('METATAGS_DIVIDER', ' ');

// Define which pages to tell robots/spiders not to index
// This is generally used for account-management pages or typical SSL pages, and usually doesn't need to be touched.
define('ROBOTS_PAGES_TO_SKIP','login,logoff,create_account,a ccount,account_edit,account_history,account_history_info,acc ount_newsletters,account_notifications,account_password,addr ess_book,advanced_search,advanced_search_result,checkout_suc cess,checkout_process,checkout_shipping,checkout_payment,che ckout_confirmation,cookie_usage,create_account_success,conta ct_us,download,download_timeout,customers_authorization,down _for_maintenance,password_forgotten,time_out,unsubscribe,inf o_shopping_cart,popup_image,popup_image_additional,product_r eviews_write,ssl_check');


// favicon setting
// There is usually NO need to enable this unless you need to specify a path and/or a different filename
// define('FAVICON','favicon.ico');

?>

If you can tell me what to do with this i would be eternally grateful.

Many thanks for your responce.


Hi All,

Can I just ask please to further this subject. I have already added my Meta Tags to my main home page no problem but the concern I am having is adding them to the other pages of my site.

I have EZ Pages installed and when it tells you to replace the # with the ID. Where is the ID located btw?

So, am I right to think once the id has been inserted into each pages.php file all you have to do then is customise the meta itself.

That is for example:
define('META_TAG_DESCRIPTION_EZPAGE_#','Page description here');
define('META_TAG_KEYWORDS_EZPAGE_#','Page keywords here');

Thanks

Kind Regards

Duncan
http://www.mysticjewels.biz

No, no, no, got a head ache just reading that - so will ignore it and say metatags for all other pages are found in the product listing in your zencart control panel.

So click catalog from control panel of zencart then click categories/products - then choose a category and your list of items in that category will be displayed -

then all you do is click the last icon on the far right of the product listing (a white circle with a black kind of bow tie within) that allows you to add meta title, description and keywords for each product.

geoff-g Wrote:
No, no, no, got a head ache just reading that - so will ignore it and say metatags for all other pages are found in the product listing in your zencart control panel.

So click catalog from control panel of zencart then click categories/products - then choose a category and your list of items in that category will be displayed -

then all you do is click the last icon on the far right of the product listing (a white circle with a black kind of bow tie within) that allows you to add meta title, description and keywords for each product.


Hi,

That just adds the Meta to each of your sites product categories.

But it will not include your pages for things like 'Contact Us', 'Gift Certificates', 'Privacy Policy' or whatever else you may wish to get searched for when the robots come to your site.

What about them?

Kind Regards
Duncan
http://www.mysticjewels.co.uk

Don't think things like privacy policy can be changed - zen cart just creates the meta tags it's own way and you are stuck with them.

as to your easy pages question:

"So, am I right to think once the id has been inserted into each pages.php file all you have to do then is customise the meta itself.

define('META_TAG_DESCRIPTION_EZPAGE_#','Page description here');
define('META_TAG_KEYWORDS_EZPAGE_#','Page keywords here');

Here it look like you just change the # for the easy page number (ie 2,3,4) - so

define(’META_TAG_DESCRIPTION_EZPAGE_2′,’add text here’);

only way is to make a copy of the files then experiment
Reference URL's