Forums / Basic Configuration / Trying to Change Meta tags for Home page only, But all the pages are getting changed

Trying to Change Meta tags for Home page only, But all the pages are getting changed

Locked

Views: 2,042

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
12 Aug 2010, 1:12 PM
#1
raulmalik avatar

raulmalik

New Zenner

Join Date:
Aug 2009
Posts:
9
Plugin Contributions:
0

Trying to Change Meta tags for Home page only, But all the pages are getting changed

Hello,
I am trying just to change the meta tags for the Home Page of my Zen cart. But very page ( pages,categories,products) meta tags are also getting changed by this.
I am trying to change the meta tags by this method :

Custom Site-Wide
For meta tags not covered by the previous paragraph, copy the includes/templates/template_default/common/html_header.php file to your includes/templates/YOUR_TEMPLATE_NAME/common/ folder. Open it up and add your own meta tag to those already there by default.

Kindly help, as i just want to change the meta tags for my home page.

12 Aug 2010, 2:07 PM
#2
clydejones avatar

clydejones

Deceased

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

Re: Trying to Change Meta tags for Home page only, But all the pages are getting changed

No, those instructions are not applicable.

have you checked includes/languages/english/meta_tags.php

in particular this section:

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

Once you've made your edits don't forget to save the edited file to includes/languages/english/YOUR_TEMPLATE/

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

21 Aug 2010, 12:35 AM
#3
imaginationtoy avatar

imaginationtoy

New Zenner

Join Date:
Jul 2010
Posts:
11
Plugin Contributions:
0

Re: Trying to Change Meta tags for Home page only, But all the pages are getting changed

Hello!

In my /includes/languages/english/meta_tags.php file, under the Per-Page meta-tags section, I have set up several of my pages with different titles, keywords and descriptions, but when I go to my live site, nothing has changed. I have the same title, keywords and descriptions for every one of my Zen Cart pages, which is not what I want. What am I doing wrong?

imagination toy station.net

1 Sep 2010, 2:13 AM
#4
ttfan avatar

ttfan

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
231
Plugin Contributions:
0

Re: Trying to Change Meta tags for Home page only, But all the pages are getting changed

I've made the changes, just for the home page, in meta_tags.php as well, but it does not seem to use it as it does not work.

The 1st post above seems to indicate the information is now stored in includes/templates/template_default/common/html_header.php?

1 Sep 2010, 2:27 AM
#5
drbyte avatar

drbyte

Sensei

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

Re: Trying to Change Meta tags for Home page only, But all the pages are getting changed

ttfan:

I've made the changes, just for the home page, in meta_tags.php as well, but it does not seem to use it as it does not work.What exactly have you done?
Which files did you touch?
Are there overrides for those files that could be preventing your changes from taking?
ttfan:

The 1st post above seems to indicate the information is now stored in includes/templates/template_default/common/html_header.php?Wrong instructions.

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

1 Sep 2010, 4:04 AM
#6
ttfan avatar

ttfan

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
231
Plugin Contributions:
0

Re: Trying to Change Meta tags for Home page only, But all the pages are getting changed

I've edited /includes/languages/english/meta_tags.php and added my description and keywords to :

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

I have no overrides... yet it does not show the tags when I look at the source of the home page.

2 Sep 2010, 5:46 AM
#7
ttfan avatar

ttfan

Zen Follower

Join Date:
Jul 2010
Location:
Australia
Posts:
231
Plugin Contributions:
0

Re: Trying to Change Meta tags for Home page only, But all the pages are getting changed

Are there any setting that can stop this from working?

2 Sep 2010, 6:38 AM
#8
drbyte avatar

drbyte

Sensei

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

Re: Trying to Change Meta tags for Home page only, But all the pages are getting changed

The only things that stop it from working are:
a) you're editing the wrong file (ie: you should be editing the override language file for your template)
b) you're using an old version of Zen Cart that didn't support that feature
c) you're using an addon template designed for an old version of Zen Cart that modified core files and replaced them with old versions
d) you've defined those settings as blank instead of putting something inside the quotes
e) your FTP program isn't actually uploading the files to the proper folder, or at all

Naturally, these are the same reasons that would cause almost anything to not work as expected.

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