Forums / General Questions / Meta keyword and Description the same

Meta keyword and Description the same

Locked

Views: 3,554

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
17 Apr 2007, 2:47 AM
#1
sammybotz avatar

sammybotz

New Zenner

Join Date:
Mar 2007
Posts:
68
Plugin Contributions:
0

Meta keyword and Description the same

I read threads about this but cant figure it out. I simply want my homepage keywords and description to be different naturally. I enter keywords in meta_tags.php and now the description also has all my keywords in it.

Thank you

Version 1.3.7

4 Jul 2008, 12:39 AM
#2
all4coffee avatar

all4coffee

Zen Follower

Join Date:
Jul 2007
Posts:
154
Plugin Contributions:
0

Re: Meta keyword and Description the same

Re: Meta Tag Delima
Try this:

  1. Copy /includes/modules/meta_tags.php to /includes/modules/YOURTEMPLATE/meta_tags.php

  2. Edit the /includes/modules/YOURTEMPLATE/meta_tags.php file.
    Around line 93 you'll see this: Code:
    case 'index':
    Insert the following BEFORE that line: Code:
    case ($this_is_home_page): define('META_TAG_TITLE', (defined('NAVBAR_TITLE') ? NAVBAR_TITLE . PRIMARY_SECTION : '') . TITLE . TAGLINE); define('META_TAG_DESCRIPTION', HOME_PAGE_META_DESCRIPTION); define('META_TAG_KEYWORDS', HOME_PAGE_META_KEYWORDS); break;
    Then go to your /includes/languages/english/ folder and copy meta_tags.php to YOURTEMPLATE/meta_tags.php
    and add these to the file:
    Code:
    define('HOME_PAGE_META_DESCRIPTION', 'My Home Page description metatags');define('HOME_PAGE_META_KEYWORDS','My home page keywords here');
    Now you can customize your home-page keywords till your heart's content.
    The rest of the pages will operate based on the selected category's metatags or the selected product's metatags.

I followed the above advice of Dr. Byte but where would I look to see the effect of this edit? It doesn't show in the source of my index page.
www.all4coffee.com
Is HOME page a different page than index.php?
Is Main page the same as index?

Thanks!

4 Jul 2008, 6:37 PM
#3
colemanpa avatar

colemanpa

Zen Follower

Join Date:
Oct 2007
Location:
Fairbanks, Alaska
Posts:
423
Plugin Contributions:
0

Re: Meta keyword and Description the same

you would see the effect by adding the web developer add-on for Firefox or IE and looking under Information.

5 Jul 2008, 1:05 AM
#4
all4coffee avatar

all4coffee

Zen Follower

Join Date:
Jul 2007
Posts:
154
Plugin Contributions:
0

Re: Meta keyword and Description the same

colemanpa:

you would see the effect by adding the web developer add-on for Firefox or IE and looking under Information.

I kindly thank you for your reply. When I look at the source code on my index.php page at www.all4coffee.com I see only the standard site-wide meta tags as they are assigned in html_header.php

I made edits suggested by Dr. Byte in his post
http://www.zen-cart.com/forum/showpost.php?p=355357&postcount=4

but cannot figure out on which page they are supposed to show up...

Are terms index page, main page and home page referring to the same page? Or all three are different pages? How do I find the HOME page that changes in Dr. Byte's edit are supposed to show?

5 Jul 2008, 1:18 AM
#5
colemanpa avatar

colemanpa

Zen Follower

Join Date:
Oct 2007
Location:
Fairbanks, Alaska
Posts:
423
Plugin Contributions:
0

Re: Meta keyword and Description the same

all4coffee:

I kindly thank you for your reply. When I look at the source code on my index.php page at www.all4coffee.com I see only the standard site-wide meta tags as they are assigned in html_header.php

I made edits suggested by Dr. Byte in his post
http://www.zen-cart.com/forum/showpost.php?p=355357&postcount=4

but cannot figure out on which page they are supposed to show up...

Are terms index page, main page and home page referring to the same page? Or all three are different pages? How do I find the HOME page that changes in Dr. Byte's edit are supposed to show?

yes they are all the same page etc... index.php when I looked at your main page using Firefox with the web developer plug-in under Information, view meta tag Information this is what I saw, is this what you have in your setup?

http://www.all4coffee.com/

NameContentContent-Typetext/html; charset=iso-8859-1

keywords jura, capresso, specials, impressa, best, espresso maker, Lusso, PL-16, Impressa j5, Impressa z5, Impressa z6, Impressa s7, Impressa f8, Impressa e8, la pavoni, PUB 2V, PUB 1V, PUB 1EM, PUB 1M, Bar Star 2V, CAFE 2v, ZIP grinder,reviews, lapavoni, sale, coffee gifts, free, coupons,commercial espresso,superautomatic,best price,coffee business consulting, barista training, commercial equipment, opening coffee house, expresso, coffee, sipping chocolate,piatnik cards,art, tucson,arizona

description Since 1997 All 4 Coffee Tucson Arizona La Pavoni Capresso Authorized Dealer Retailer Reseller offers Jura-Capresso La Pavoni commercial Capresso Cappuccino Makers and provides espresso business consulting barista training services.imagetoolbarno

author All 4 Coffee

generator shopping cart program by Zen Cart™, http://www.zen-cart.com eCommerce

see there not the same!

pete

5 Jul 2008, 2:01 AM
#6
all4coffee avatar

all4coffee

Zen Follower

Join Date:
Jul 2007
Posts:
154
Plugin Contributions:
0

Re: Meta keyword and Description the same

I thought the the purpose of DR. Byte's solution was that a customized meta_tags could be entered just for the Home page

In my includes/languages/english/mytemplate/meta_tags.php file I edited (for testing) the following
// Home Page ONLY Settings
define('HOME_PAGE_META_DESCRIPTION', 'Testing for home page This is the description for Home Page Only');
define('HOME_PAGE_META_KEYWORDS','Testing for home page, Capresso, Jura, La Pavoni');

so the above shows up on my home page but it doesn't... The meta_tags you see there are the same as they always been and still are in my
includes/modules/mytemplate/meta_tags.php file despite DR. Byte's edit shown i red:

// Get different meta tag values depending on main_page values
switch ($_GET['main_page']) {
case ($this_is_home_page == true):
define('META_TAG_TITLE', 'Jura Capresso Impressa Super Automatic Espresso Coffee Makers Grinders: Authorized Dealer Retailer Reseller La Pavoni specials sale reviews best prices free');
define('META_TAG_DESCRIPTION', 'Since 1997 All 4 Coffee Tucson Arizona La Pavoni Capresso Authorized Dealer Retailer Reseller offers Jura-Capresso La Pavoni commercial Capresso Cappuccino Makers and provides espresso business consulting barista training services.');
define('META_TAG_KEYWORDS', 'jura, capresso, specials, impressa, best, espresso maker, Lusso, PL-16, Impressa j5, Impressa z5, Impressa z6, Impressa s7, Impressa f8, Impressa e8, la pavoni, PUB 2V, PUB 1V, PUB 1EM, PUB 1M, Bar Star 2V, CAFE 2v, ZIP grinder,reviews, lapavoni, sale, coffee gifts, free, coupons,commercial espresso,superautomatic,best price,coffee business consulting, barista training, commercial equipment, opening coffee house, expresso, coffee, sipping chocolate,piatnik cards,art, tucson,arizona');
break;
case 'advanced_search':
case 'account_edit':
case 'account_history':
case 'account_history_info':
case 'account_newsletters':
case 'account_notifications':
case 'account_password':
case 'address_book':

define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . TAGLINE);
define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_1 . SECONDARY_SECTION . KEYWORDS);
define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . NAVBAR_TITLE_1);
break;
case 'address_book_process':
define('META_TAG_TITLE', NAVBAR_TITLE_ADD_ENTRY . PRIMARY_SECTION . TITLE . TAGLINE);
define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_ADD_ENTRY . SECONDARY_SECTION . KEYWORDS);
define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . NAVBAR_TITLE_ADD_ENTRY);
break;

case 'advanced_search_result':
case 'password_forgotten':
define('META_TAG_TITLE', NAVBAR_TITLE_2 . PRIMARY_SECTION . TITLE . TAGLINE);
define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . NAVBAR_TITLE_2 . SECONDARY_SECTION . KEYWORDS);
define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . NAVBAR_TITLE_2);
break;

case 'checkout_confirmation':
case 'checkout_payment':
case 'checkout_payment_address':
case 'checkout_shipping':
case 'checkout_success':
case 'create_account_success':
define('META_TAG_TITLE', HEADING_TITLE . PRIMARY_SECTION . TITLE . TAGLINE);
define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . HEADING_TITLE . SECONDARY_SECTION . KEYWORDS);
define('META_TAG_KEYWORDS', KEYWORDS . METATAGS_DIVIDER . HEADING_TITLE);
break;
case ($this_is_home_page):
define('META_TAG_TITLE', (defined('NAVBAR_TITLE') ? NAVBAR_TITLE . PRIMARY_SECTION : '') . TITLE . TAGLINE);
define('META_TAG_DESCRIPTION', HOME_PAGE_META_DESCRIPTION);
define('META_TAG_KEYWORDS', HOME_PAGE_META_KEYWORDS);
break;

case 'index':
// bof: categories meta tags
// run custom categories meta tags
$sql = "select * from " . TABLE_METATAGS_CATEGORIES_DESCRIPTION . " mcd where mcd.categories_id = '" . (int)$current_category_id . "' and mcd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
$category_metatags = $db->Execute($sql);


Do you have any idea what is wrong?
I really apreciate you willing to help!

5 Jul 2008, 3:00 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Meta keyword and Description the same

Why are you editing the module file?
All the instructions in my post to which you are referring are for the language 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.

5 Jul 2008, 10:27 AM
#8
all4coffee avatar

all4coffee

Zen Follower

Join Date:
Jul 2007
Posts:
154
Plugin Contributions:
0

Re: Meta keyword and Description the same

DrByte:

Why are you editing the module file?
All the instructions in my post to which you are referring are for the language file.

Your post at
http://www.zen-cart.com/forum/showpost.php?p=355357&postcount=4

calls to edit the module file as well...

Please clarify. Thanks.

6 Jul 2008, 1:25 AM
#9
all4coffee avatar

all4coffee

Zen Follower

Join Date:
Jul 2007
Posts:
154
Plugin Contributions:
0

Re: Meta keyword and Description the same

Never mind, Dr. Byte. I just realized that I do have this function already (to define unique title, description and keywords meta tags for the Home page) - with my: includes/modules/mytemplate/meta_tags.php file
which already includes the code
// Get different meta tag values depending on main_page values
switch ($_GET['main_page'
]) {
case (
$this_is_home_page == true
):
define('META_TAG_TITLE', 'MY HOME PAGE CUSTOM TITLE '
);
define('META_TAG_DESCRIPTION', 'My HOME PAGE CUSTOM DESCRIPTION'
);
define('META_TAG_KEYWORDS', 'MY HOME PAGE CUSTOM KEYWORDS'
);
break;


The rest of the pages uses meta tags defined with my
includes/languages/mytemplate/meta_tags.php file

Was this originally built into the 1.3.7 or I did customize it in the past and forgot about it? Just wondering - otherwise why this solution
http://www.zen-cart.com/forum/showpost.php?p=355357&postcount=4

Am I missing anything here?

6 Jul 2008, 6:53 AM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Meta keyword and Description the same

It was added in v1.3.8. So you must have done it yourself.

.
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.

17 Feb 2010, 8:12 PM
#11
laisunshine avatar

laisunshine

New Zenner

Join Date:
Nov 2007
Posts:
59
Plugin Contributions:
0

Re: Meta keyword and Description the same

Hello,
I am having the same issue. I went to the includes/languages/english/meta_tags.php file and put in my keywords/description there. When I go to check the source, my description and keywords are the same and they aren't the keywords/descriptions that I put in the meta_tags.php file. I am a little confused about the module meta_tag.php file too. Am I supposed to do something with that or not. Sorry. Any suggestions are appreciated.