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 21 to 36 of 36
This thread is locked. New replies are disabled.
6 Apr 2007, 11:42 PM
#21
rupert avatar

rupert

New Zenner

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

meta tags keywords & description are the same

Ah Linda,
You are at too high a level for me :) Thx for you time on this.

I keep trying, I have tried all these first lines for pages already defined:

case 'ezp-5':
case 'page-5':
case 'page 5':
case 'Mens+Suits-ezp-5/chapter-5/':
case 'ezp-5':
case 'Mens+Suits':
case 'Mens_Suits':
case 'Mens Suits':

Not change the metas yet :(

Can you help with this last step please?

6 Apr 2007, 11:56 PM
#22
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

The case is literally set as:

case 'page': 

Within that case you could get specific on the $_GET['id'] that you see in the URL if you want specific meta tags per easy page ...

7 Apr 2007, 12:05 AM
#23
rupert avatar

rupert

New Zenner

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

Re: meta tags keywords & description are the same

Linda,
can you give me an example please?
I am all at sea.

7 Apr 2007, 12:10 AM
#24
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

Have you an URL to one that you cannot figure out? :smile:

7 Apr 2007, 12:14 AM
#25
rupert avatar

rupert

New Zenner

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

Re: meta tags keywords & description are the same

tried this:

 
switch ($_GET['5']) {
  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; 
}

At least it did not break it, but it does not work...

7 Apr 2007, 12:20 AM
#27
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

Find this code in the meta_tags.php

  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;

Beneath it add:

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;  

Now ... all EZ-Pages read this way that are additional pages ...

To get specific on the given ID ...

Use this under that case for address_book:

case 'page':
  switch($_GET['id']) {
    case (1):
      define('META_TAG_TITLE', 'EZ-Page 1 ');
      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;
    case (14):
      define('META_TAG_TITLE', 'EZ-Page 14 ');
      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;
    default:
      define('META_TAG_TITLE', 'EZ-Page DEFAULT ');
      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;
  }
  break;

Now id 1 and 14 have unique ones and everything else gets the default ...

7 Apr 2007, 12:21 AM
#28
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

NOTE: I haven't a clue if that will work with that SEO add-on that you are using ...

This works for Zen Cart core code ... :smile:

7 Apr 2007, 12:33 AM
#29
rupert avatar

rupert

New Zenner

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

Re: meta tags keywords & description are the same

Linda,
You are marvelous!!! Thx.
works a treat :) amazing.
I will put it in for all my EZ pages now, and then sleep like a baby.
It is 1.30 in the Uk, and my wonderful Daughter had me up all last night...:blink:

7 Apr 2007, 12:34 AM
#30
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

/me thud ... :blink:

Glad that this is now working for you ... remember us when you are rich and famous ... :smartalec:

7 Apr 2007, 12:52 AM
#31
rupert avatar

rupert

New Zenner

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

Re: meta tags keywords & description are the same

Rich and famous? Never.

not got the drive :) The internet has been giving me a living for a few yrs now, so I have bought you and the team a coffee.

Thx Again.

7 Apr 2007, 12:54 AM
#32
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

Coffee!!! We love coffee almost as much as Bacon!!! :clap:

25 Oct 2007, 8:23 AM
#33
miles avatar

miles

Zen Follower

Join Date:
Oct 2006
Location:
At Home
Posts:
357
Plugin Contributions:
0

Re: meta tags keywords & description are the same

Mine didn't work..

In includes/modules/myshape/meta_tags.php

I had changed the codes from this

}
$keywords_string_metatags = "";
define('KEYWORDS', str_replace('"','',CUSTOM_KEYWORDS .', '. zen_clean_html($keywords_string_metatags)));

// Get different meta tag values depending on main_page values
switch ($_GET['main_page']) {
  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;
```to this
```php
}
$keywords_string_metatags = "";
define('KEYWORDS', str_replace('"','',CUSTOM_KEYWORDS .', '. zen_clean_html($keywords_string_metatags)));

// Get different meta tag values depending on main_page values
switch ($_GET['main_page']) {
  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 'page':
  switch($_GET['id']) {
    case (1):
      define('META_TAG_TITLE', 'EZ-Page 1 ');
      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;
    case (14):
      define('META_TAG_TITLE', 'EZ-Page 14 ');
      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;
    default:
      define('META_TAG_TITLE', 'EZ-Page DEFAULT ');
      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;
  }
  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;

When I looked at the (e.g About Us) page source, those metas still the same.

Can someone please help me?

28 Oct 2007, 11:28 AM
#34
miles avatar

miles

Zen Follower

Join Date:
Oct 2006
Location:
At Home
Posts:
357
Plugin Contributions:
0

Re: meta tags keywords & description are the same

Is there anything I missed?

16 Nov 2007, 8:35 PM
#35
jensderknipser avatar

jensderknipser

New Zenner

Join Date:
Mar 2006
Location:
munich
Posts:
34
Plugin Contributions:
0

Re: meta tags keywords & description are the same

Hi,

in general the way Ajeh described the workaroung it works. But I have inserted up to 20 ez-pages, so now not every page is handled correctly. Is there a limitation of numbers of additional pages? And - as five of them are chapters, they are completely not handled (means I see the title "ez-pages DEFAULT") Ajeh, do you have maybe an idea???

Thanks for helping,

jens

3 Sep 2008, 2:10 PM
#36
tecbrat avatar

tecbrat

Zen Follower

Join Date:
Feb 2005
Posts:
239
Plugin Contributions:
0

Re: meta tags keywords & description are the same

VaicekaL:

Thanks, it worked! :smile:

I just used this on 1.3.7.1 and it still seems to work.

THANKS!