It goes in your meta_tags.php language file, but only works in v1.3.8 and newer. You'll see the existing examples already in the file.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Thanks. Yes - this is the right location but there was a typo in the given code. The two highlighted in red sections need to be removed from the code. I placed it around line 47 just above the
// favicon setting entry
It does seem to work with my v. 1.3.7Code:// 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', '');
http://www.all4coffee.com/index.php?main_page=page_2
Thanks again!
That is correct ... bug report here: http://www.zen-cart.com/forum/showthread.php?t=110210 ... fixed in 1.3.9 and newer
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
I'm confused by this thread. I'm running 1.3.8a. Here's the modified part of my meta_tags.php below.
The problem is Zen is putting my category names into the meta keywords for each product page. I'd like to remove them. Example below, taken from the page source when viewing the page in a browser. The last several keywords are my CUSTOM_KEYWORDS, which is perfect. I'd like to remove the category names from it. How should I go about doing so?Code:// page title define('TITLE', 'Adamant Barbell'); // Site Tagline define('SITE_TAGLINE', 'Home Gym Exercise & Fitness Equipment'); // Custom Keywords define('CUSTOM_KEYWORDS', 'gym equipment, strength equipment, exercise equipment, exercise machines, home gyms'); // Home Page Only: define('HOME_PAGE_META_DESCRIPTION', 'Online store to buy gym equipment, exercise machines, home gyms, cardio equipment, barbells, dumbbells, weights, and lots of accessories.'); define('HOME_PAGE_META_KEYWORDS', 'gym equipment, exercise equipment, cardio equipment, workout equipment, weights, gym weights, barbell, weight bench');
I'm defining all my category meta keywords and descriptions manually, so it's really only product pages that's the issue. I'll get to EZ pages and whatnot too, but one thing at a time!<meta name="keywords" content="Power Systems Leg Press / Hack Squat [ps-46164], Home Gyms, Power Racks/Cages, Hand & Forearm, Dumbbells, Olympic Weights, Misc. Accessories, Standard Weights, Inversion Systems, Belts, Gloves & Straps, Bars, Cardio Equipment, Medicine Balls, Body Weights, Kettlebells, Machines, Fixed Barbells, Yoga & Pilates, Mats & Flooring, Wraps/Supports, Rubber Bands/Tubes, Abdominal Exercisers, Stability & Balance, Contour-Weights, Jump Ropes, Media, Rebounders, Storage Racks, Benches, Pull Up Bars, Testing & Measurement, Platforms, gym equipment, strength equipment, exercise equipment, exercise machines, home gyms" />
I am trying to figure out how to remove the addition of site title to each product title metatag. Can someone please point me in the right direction. Thanks!
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Since that would require editing 20,000+ products I changed lines 289-291 in includes/modules/meta_tags.php from:
to:PHP Code:define('META_TAG_TITLE', str_replace('"','',$review_on . $meta_products_name . $meta_products_price . PRIMARY_SECTION . TITLE . TAGLINE));
define('META_TAG_DESCRIPTION', str_replace('"','',TITLE . ' ' . $meta_products_name . SECONDARY_SECTION . $products_description . ' '));
define('META_TAG_KEYWORDS', str_replace('"','',$meta_products_name . METATAGS_DIVIDER . KEYWORDS));
That took care of both the site title being added to product title as well description.PHP Code:define('META_TAG_TITLE', str_replace('"','',$review_on . $meta_products_name . $meta_products_price . PRIMARY_SECTION . TAGLINE));
define('META_TAG_DESCRIPTION', str_replace('"','',$meta_products_name . SECONDARY_SECTION . $products_description . ' '));
define('META_TAG_KEYWORDS', str_replace('"','',$meta_products_name . METATAGS_DIVIDER . KEYWORDS));
Thanks!
As long as you remember that now you have more custom code that is now inconsistent with the data in your database ...
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.