Zen Cart Logo
Forums / General Questions / meta tags keywords & description are the same

meta tags keywords & description are the same

Locked

Views: 21,321

Results 1 to 20 of 36
This thread is locked. New replies are disabled.
14 Jul 2006, 10:10 PM
#1
machoman avatar

machoman

New Zenner

Join Date:
Jul 2006
Posts:
34
Plugin Contributions:
0

meta tags keywords & description are the same

My meta tags keywords & description are the same on my homepage. I tried to find where this is but am having no luck. Check the source here http://www.machomanjack.com/store

15 Jul 2006, 8:01 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: meta tags keywords & description are the same

They are exactly as the code works... built dynamically from your categories and custom content.... and change according to which page/product/category you're viewing.

What exactly were you wanting it to do? and what did you want on other pages?

15 Jul 2006, 2:11 PM
#3
machoman avatar

machoman

New Zenner

Join Date:
Jul 2006
Posts:
34
Plugin Contributions:
0

Re: meta tags keywords & description are the same

It seems all other pages are ok except the homepage (index) I want the description to be the description - not keywords.

16 Jul 2006, 8:27 PM
#4
machoman avatar

machoman

New Zenner

Join Date:
Jul 2006
Posts:
34
Plugin Contributions:
0

Re: meta tags keywords & description are the same

Anybody know about this? Im trying to submit to search engines and sites - but I have now correct description. Is there a fix for this?

Ed

16 Jul 2006, 9:01 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: meta tags keywords & description are the same

  1. open your /includes/languages/english/YOURTEMPLATE/meta_tags.php

  2. add a new line anywhere between the <?php and the closing ?> which says:

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
      define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . str_replace(array("'",'"'),'',strip_tags(HEADING_TITLE)) . SECONDARY_SECTION . KEYWORDS);
```change that to:```php
      define('META_TAG_DESCRIPTION', MY_IMPORTANT_HOME_PAGE_DESCRIPTION);
  1. Submit to search engines and watch closely
16 Jul 2006, 9:32 PM
#6
machoman avatar

machoman

New Zenner

Join Date:
Jul 2006
Posts:
34
Plugin Contributions:
0

Re: meta tags keywords & description are the same

Thank you very much!! Tat did the trick.

18 Jul 2006, 1:42 PM
#7
designbydemeter avatar

designbydemeter

Zen Follower

Join Date:
Jun 2006
Location:
Taos,NM
Posts:
225
Plugin Contributions:
0

Re: meta tags keywords & description are the same

Worked perfectly - now- can I do something similar for the main page keywords???

Thanx!

5 Aug 2006, 6:09 AM
#8
brisbanetimeout avatar

brisbanetimeout

Zen Follower

Join Date:
Jul 2006
Posts:
108
Plugin Contributions:
0

Re: meta tags keywords & description are the same

Ok... that fixed my problem... well sort of.. the description part worked but the most of the keywords are selected by ZEN... whatever I put in the catorgory menu will show up at keywords... I can add them myself but ZEN just adds them to the end of the ones it put in itself... makes sense ??

Have a look at my site exampe but in this search http://www.submitexpress.com/ go to META TAG ANALIZE and type in my page . https://www.timeoutmassage.com.au/zen and look at the Keywords... most of them are the menus and MY keywords are added on the end....
I want to add ALL keywords... do not want ZEN to do it for me..

Ta
Dave

8 Sep 2006, 11:25 PM
#9
ryangsoton avatar

ryangsoton

New Zenner

Join Date:
Jul 2006
Posts:
86
Plugin Contributions:
0

Re: meta tags keywords & description are the same

Evening all, can anyone help?

I dont have the metatags.php in includes/modules/mytemplate. I also dont have it in includes/modules/classic.

Any ideas on this? Need to edit my site desciption which displays on google. Have amended it in languages/english/mytemplate/metatags but cant get the 2nd part of the above solution sorted.

Any info greatly appreciated!

Many thanks

20 Sep 2006, 9:09 PM
#10
bhfruitcakeco avatar

bhfruitcakeco

New Zenner

Join Date:
Aug 2006
Posts:
22
Plugin Contributions:
0

Re: meta tags keywords & description are the same

ryangsoton:

Evening all, can anyone help?

I dont have the metatags.php in includes/modules/mytemplate. I also dont have it in includes/modules/classic.

Any ideas on this? Need to edit my site desciption which displays on google. Have amended it in languages/english/mytemplate/metatags but cant get the 2nd part of the above solution sorted.

Any info greatly appreciated!

Many thanks

I think this is what you want to do:

Copy it from /includes/modules/meta_tags.php and then create /includes/modules/YOURTEMPLATE/ and upload the modified meta_tags.php file there.

25 Sep 2006, 1:47 PM
#11
vaicekal avatar

vaicekal

New Zenner

Join Date:
Sep 2006
Posts:
9
Plugin Contributions:
1

Re: meta tags keywords & description are the same

MY IMPORTANT HOME PAGE DESCRIPTION worked well in the Zencart version 1.3.2. After I upgraded to version 1.3.5, this trick does not work anymore! :no:
On the line 148 (not 138) of /includes/modules/YOURTEMPLATE/meta_tags.php we have:
define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . str_replace(array("'",'"'),'',strip_tags(HEADING_TITLE)) . SECONDARY_SECTION . KEYWORDS);
That line needs to be replaced by:
define('META_TAG_DESCRIPTION', MY_IMPORTANT_HOME_PAGE_DESCRIPTION);
But the home page still displays an automatically generated description instead of defined one in /includes/languages/english/YOURTEMPLATE/meta_tags.php:
// Home Page Description
define('MY_IMPORTANT_HOME_PAGE_DESCRIPTION', 'Unique gifts, jewelry, Baltic amber, ... ');
Check out it here.
Please help! :down:

25 Sep 2006, 4:58 PM
#12
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: meta tags keywords & description are the same

In your includes -> templates -> YOUR_TEMPLATE -> common -> html_header.php

add the following code:

<?php if ($current_page!='index' || (int)$cPath>0 ) { ?>
<meta name="description" content="<?php echo META_TAG_DESCRIPTION; ?>" />
<?php } else { ?>
<meta name="description" content="<?php echo CUSTOM_HOMEPAGE_META_TAG_DESCRIPTION; ?>" />
<?php } ?>
26 Sep 2006, 5:10 AM
#13
vaicekal avatar

vaicekal

New Zenner

Join Date:
Sep 2006
Posts:
9
Plugin Contributions:
1

Re: meta tags keywords & description are the same

Thanks, it worked! :smile:

As you suggested, I modified the includes -> templates -> YOUR_TEMPLATE -> common -> html_header.php by replacing line 42:

<meta name="description" content="<?php echo META_TAG_DESCRIPTION; ?>" />

with the following:

<?php if ($current_page!='index' || (int)$cPath>0 ) { ?> <meta name="description" content="<?php echo META_TAG_DESCRIPTION; ?>" /> <?php } else { ?> <meta name="description" content="<?php echo MY_IMPORTANT_HOME_PAGE_DESCRIPTION; ?>" /> <?php } ?>

The only other change was the addition of the following line in includes/languages/english/YOURTEMPLATE/meta_tags.php:

// Home Page Description
define('MY_IMPORTANT_HOME_PAGE_DESCRIPTION', 'Unique gifts, jewelry, Baltic amber, ... ');

Thanks a lot! The custom homepage metatag description works in version 1.3.5 too! :yes:

Check out it here.

27 Feb 2007, 3:10 PM
#14
hondauser85 avatar

hondauser85

Zen Follower

Join Date:
Apr 2005
Posts:
95
Plugin Contributions:
0

Re: meta tags keywords & description are the same

Can i do this same techique with the keywords as the description part did work can i just change "description" to keywords?

16 Mar 2007, 4:28 PM
#15
motti avatar

motti

Zen Follower

Join Date:
Feb 2007
Location:
Los Angeles
Posts:
348
Plugin Contributions:
0

Re: meta tags keywords & description are the same

Hello to you all

1 st i want to say thank you for all of you that take the time helpping,
i am a new to web site, but here i find it not that scary to play around with my site.

well i was able to fix my description but i have no idea how to fix the keyword, can some one help me?

my site is www.tiledepot.us/store and after all that was say in this blog, i can't find any where how to edit my keyword, seam that any place i try i mess up my site or it dose not make any effect on my keywords

thank again

17 Mar 2007, 12:10 AM
#16
motti avatar

motti

Zen Follower

Join Date:
Feb 2007
Location:
Los Angeles
Posts:
348
Plugin Contributions:
0

Re: meta tags keywords & description are the same

Hi again

Tahnks i find the answer and thank to vitualahmad and his quick responed i am all set to go , if any one need my help in regard that issue , i dont mind email me [email protected] as i dont log in here only when i have probelm lol

thx for all other thet help me by posting answers you are great

:thumbsup:

3 Apr 2007, 2:06 PM
#17
rupert avatar

rupert

New Zenner

Join Date:
Feb 2007
Posts:
50
Plugin Contributions:
0

Re: meta tags keywords & description are the same

DrByte,
Dont suppose you could develop this further for us could you? This is a great insite, but not being a programmer I cannot take it to the next step :)

DrByte:

  1. open your /includes/languages/english/YOURTEMPLATE/meta_tags.php

  2. add a new line anywhere between the <?php and the closing ?> which says:

define('MY_IMPORTANT_HOME_PAGE_DESCRIPTION', 'blah blah blah blah');

>  
> 3. edit /includes/modules/YOURTEMPLATE/meta_tags.php
> around line 138 you have:```php
      define('META_TAG_DESCRIPTION', TITLE . PRIMARY_SECTION . str_replace(array("'",'"'),'',strip_tags(HEADING_TITLE)) . SECONDARY_SECTION . KEYWORDS);
```change that to:```php
      define('META_TAG_DESCRIPTION', MY_IMPORTANT_HOME_PAGE_DESCRIPTION);

Can this be edited for all pages? cannot quite see my way through though to try it. If I add lines as in 2 above:

define('CONTACT_US_DESCRIPTION', 'blah blah blah blah'); 
define('ABOUT_US_DESCRIPTION', 'blah2 blah2 blah2 blah2');    

Can I then do something with the other file? Also with the title?

Ideally, we could just do something like this:

define('CONTACT_US_TITLE', 'The best title in the world');
define('CONTACT_US_DESCRIPTION', 'blah blah blah blah');
define('NEW_EZPAGE_OR_OTHER_TITLE', 'The best second title in the world');
define('NEW_EZPAGE_OR_OTHER_DESCRIPTION', 'blah2 blah2 blah2 blah2');

Does this make sense? Is there a way to make this work please?

5 Apr 2007, 12:33 AM
#18
kennyoz avatar

kennyoz

New Zenner

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

Re: meta tags keywords & description are the same

DrByte:

  1. open your /includes/languages/english/YOURTEMPLATE/meta_tags.php
    Thanks Doctor...
    I need this quick and easy fix too...:clap:
    Just have to hope G**gle crawl my home page soon to fix up my webpage description.
6 Apr 2007, 9:03 PM
#19
rupert avatar

rupert

New Zenner

Join Date:
Feb 2007
Posts:
50
Plugin Contributions:
0

Re: meta tags keywords & description are the same

Ok got part of it. Put:

case 'about_us': 
  define('META_TAG_TITLE', 'About site '); 
  define('META_TAG_DESCRIPTION', 'If you call us you I will either answer you personally, or my wife Sue, or Debbie will answer. Same with email. So If you have any questions, please do not hesitate to ask.'); 
  define('META_TAG_KEYWORDS', 'keywords'); 
  break; 

Into
modules/eshopone/meta_tags.php

Just need something similar for ezpages :)

6 Apr 2007, 11:10 PM
#20
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: meta tags keywords & description are the same

For EZ-Pages ... you could start with this for those pages that are defined:

  case 'page':
  define('META_TAG_TITLE', 'EZ-Page ');
  define('META_TAG_DESCRIPTION', 'This page is just an EZ way for us to build new pages');
  define('META_TAG_KEYWORDS', 'keywords lots and lots of ez keywords');
  break;

You could get more specific per page if needed with the $_GET['id'] ...