Post by nickjulia » Wed Dec 08, 2010 5:18 am

If I wanted the Title tag for each product page to be the following:

Product Category | Product name | Modelnum | Some Keyword Dense Text

How would I do that. Also, is there a way to setup some custom title tags for the home page?

Thanks

----------------------------------------------------------------------------------------
eCommerce Development - eCommerce Web Design - Phoenix Web Design


Newbie

Posts

Joined
Thu Nov 25, 2010 8:26 am

Post by Johnathan » Wed Dec 08, 2010 11:40 am

I originally posted this here, but just so the information is also in this thread:

The way I do it is to use the Meta Keywords field as an optional "page title" field, and override the default title if anything in Meta Keywords exists. It's an easy, one-line edit:

IN:

Code: Select all

/catalog/view/theme/YOURTHEME/template/common/header.tpl
REPLACE:

Code: Select all

<?php echo $title; ?>
WITH:

Code: Select all

<?php if ($keywords) { echo $keywords; } else { echo $title; } ?>

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by ifyouseek » Wed Jan 19, 2011 9:54 am

works great! thanks.

Did you remove the meta keywords from the template or just leave it in?

Active Member

Posts

Joined
Thu May 06, 2010 4:40 pm

Post by Johnathan » Wed Jan 19, 2011 10:49 pm

I think I just left it in. Most search engines don't use the meta keywords field anyway.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by jcgadgets » Fri Jan 21, 2011 1:12 pm

Hi,

This looks great - but I'd rather be able to input the words for the title tag from a source other than the meta keywords field. I know that they say most of the search engines don't use them at all...but I'm hesitant to completely disregard them :S Is there a simple way to still get custom title tags, or should I just forget it and go with this solution?


Thank you,
Jared

Active Member

Posts

Joined
Sun Oct 31, 2010 4:49 pm

Post by Chones » Fri Jan 21, 2011 6:28 pm

Hi Jared,

You can EXTEND your title tags if you want, using the location field - that's what I do and it works really well.

http://forum.opencart.com/viewtopic.php?t=9640

http://scarletandjones.com/
http://sharpdressedman.co.uk/
http://coffincompany.co.uk/
http://horsesculptures.co.uk/
If I've helped you out, why not buy me a beer? http://craigmurray.me.uk


User avatar
Active Member

Posts

Joined
Wed Mar 24, 2010 9:07 pm
Location - London

Post by JAY6390 » Fri Jan 21, 2011 8:48 pm

Just to note

Code: Select all

    <?php if ($keywords) { echo $keywords; } else { echo $title; } ?>
can be reduced to

Code: Select all

    <?php echo $keywords ? $keywords : $title; ?>
I know it's not much but for such a simple line I like it "clean"

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by Johnathan » Fri Jan 21, 2011 9:55 pm

JAY6390 wrote:Just to note

Code: Select all

    <?php if ($keywords) { echo $keywords; } else { echo $title; } ?>
can be reduced to

Code: Select all

    <?php echo $keywords ? $keywords : $title; ?>
I know it's not much but for such a simple line I like it "clean"
Yeah, I don't know why I put the longer version in there originally. Clarity, maybe? Anyway, good suggestion.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by BrianW » Mon Mar 21, 2011 8:30 am

Ah, thank you so much for this! Fantastic and simple solution to get custom titles on your products and categories!

Give a man a fire and you make him warm for a day. Light a man on fire, and you make him warm for the rest of his life.
http://www.awesomedice.com


New member

Posts

Joined
Mon Mar 21, 2011 5:39 am
Location - Massachusetts

Post by vlad123 » Thu Jun 16, 2011 4:41 pm

Johnathan wrote:I originally posted this here, but just so the information is also in this thread:

The way I do it is to use the Meta Keywords field as an optional "page title" field, and override the default title if anything in Meta Keywords exists. It's an easy, one-line edit:

IN:

Code: Select all

/catalog/view/theme/YOURTHEME/template/common/header.tpl
REPLACE:

Code: Select all

<?php echo $title; ?>
WITH:

Code: Select all

<?php if ($keywords) { echo $keywords; } else { echo $title; } ?>
Just tried this method and its works great.
Makes thins for me much easier
Thank for your contribution.

Newbie

Posts

Joined
Mon Mar 08, 2010 7:31 pm

Post by shimon » Sat Nov 05, 2011 12:22 am

What is the code syntax if I want my Title Tag to dynamically look like this:

Rings | Sapphire Rings | Large Sapphire Ring - MySite Name

For this URL: http://www.mysite.com/rings/sapphire-ri ... phire-ring

Using the Category, Subcategory, Product Name

Any help will be much appreciated.

Professional SEO Consulting
http://www.shimonsandler.com


New member

Posts

Joined
Sun Oct 16, 2011 12:27 pm


Post by dony_b » Sat Nov 05, 2011 2:10 am

What if I wanted the manufacturers name there ?

will this work ?

Code: Select all

<?php if ($manufacturer) { echo $$manufacturer; } else { echo $title; } ?>

User avatar
Active Member

Posts

Joined
Wed Aug 18, 2010 9:56 pm
Location - Boston, MA

Post by 24leaves.com » Tue Nov 08, 2011 7:00 am

Yeap!
This is how some muppets can just ruin your business.
With ideas like this....
Yeap! You can change the title tag changing this code..... bla bla bla
YOU! STUPID PHP GUYS!
I just got penalized by google doing what you said. I am not in the first 50 pages on search engines after I had that little line changed for no more than 3 hours. Fortunately I realized what I have done and now I am waiting for google to put me back in rights.
IF YOU CHANGE YOUR TITLE TAGS ON ALL THE PAGES ( with a smart php code) GOOGLE WILL SPIT YOU LIKE A BAD TEETH.
DO NOT DO IT UNTIL YOU JUST STARTED WITH YOUR WEBSITE AND YOU HAVE NO CATEGORY OR PRODUCT IN YOUR WEBSITE!
OTHERWISE YOU"LL CRY LIKE ME!

http://www.24leaves.com
Image


Newbie

Posts

Joined
Thu Jul 21, 2011 2:45 am

Post by JAY6390 » Tue Nov 08, 2011 7:03 am

That is absolute nonsense. Google doesn't kick you out for having different title tags. What it will kick you out for is cloaking, where you mask the content of your site with information relating to something completely different

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by 24leaves.com » Wed Nov 09, 2011 1:36 pm

So... you didn't heard what I've just said! Why don't you search my domain.. 24leaves on google to figure out yourself that I am right.I am not... clocking or whatever you are talking about. My content is not obvious so...that is what you get on changing that line.Do it yourself on your website with 100 products in 14 languages and you'll see what I am talking about.
Have a nice day!

http://www.24leaves.com
Image


Newbie

Posts

Joined
Thu Jul 21, 2011 2:45 am

Post by ifyouseek » Wed Feb 08, 2012 2:25 am

google might not like the sudden change to all product and category title tags.. it would definitely effect your rankings initially but in the long term i think this solution will help you rank higher for the more specific keywords you are targeting rather than just targeting the actual product name like standard unmodded opencart does.

Active Member

Posts

Joined
Thu May 06, 2010 4:40 pm

Post by michael2820 » Wed Apr 24, 2013 6:19 am

JAY6390 wrote:Just to note

Code: Select all

    <?php if ($keywords) { echo $keywords; } else { echo $title; } ?>
can be reduced to

Code: Select all

    <?php echo $keywords ? $keywords : $title; ?>
I know it's not much but for such a simple line I like it "clean"
NO, my experience do NOT reduce it

--- please reply only with verified data, that is: no 'I think', 'maybe' etc. ---


User avatar
Active Member

Posts

Joined
Sun May 15, 2011 8:16 pm
Location - Denmark OC 2102

Post by JAY6390 » Wed Apr 24, 2013 7:03 am

Care to give a reason as to why not? It's cleaner, just as efficient if not more so and does exactly the same thing

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

Post by michael2820 » Wed Apr 24, 2013 5:51 pm

@JAY6390: I use version 1.4.9.6. First of all: I am talking about this line

<title><?php if ($keywords) { echo $keywords; } else { echo $title; } ?></title>

I followed your advice many months ago, but then I looked closely to the title in Google results and compared with the string I have written in the field "Meta tag keywords" and it was not identical. Google results showed the string in "Product name". Yesterday I changed it back and then it worked. You can see the difference in my shop - look to the very top at the titlebar of the browser and compare with the name of the product.

--- please reply only with verified data, that is: no 'I think', 'maybe' etc. ---


User avatar
Active Member

Posts

Joined
Sun May 15, 2011 8:16 pm
Location - Denmark OC 2102

Post by Wooly » Wed Jun 05, 2013 5:48 am

I just used this, and although it is working, it is over riding the title... is this okay?

of course i would like neatly written title tags but i dont want it to jeopardise my rating. Can someone just assure me whether this is right or wrong?

Many thanks

New member

Posts

Joined
Sun May 05, 2013 11:00 pm
Who is online

Users browsing this forum: Amazon [Bot] and 23 guests