You are here:  » Seo Friendly Titles

Support Forum



Seo Friendly Titles

Submitted by bizroot on Wed, 2010-03-10 11:53 in

Hi David,

I wonder if its possible..I want seo friendly urls for product pages filled automatically with meta keywords and description.

Thanks
Rajeev

Submitted by support on Wed, 2010-03-10 13:41

Hello Rajeev,

As you mention the description; I assume you are referring to the page Title (as you are in the post title) rather than the URL.

This is straight forward to do; it's mainly down to personal choice based on your SEO strategy; but the title as it stands is set to just be the product name, by the following code on line 50 of products.php:

$header["title"] = htmlentities($q,ENT_QUOTES,$config_charset);

On the next 2 lines; you will also see where the meta keywords (also set to just the product name) and description are set. These variables are ultimately displayed by html/header.php

So, to add the description into the page title if that is what you want to do, REPLACE the above line with:

$header["title"] =
   htmlentities($q,ENT_QUOTES,$config_charset)
  .htmlentities($product["products"][0]["description"],ENT_QUOTES,$config_charset);

Hope this helps!

Cheers,
David.

Submitted by bizroot on Thu, 2010-03-11 05:50

It still shows the title as my domain name on all the product pages....I tried to make the changes you suggested but it still is same..title remains the same as my domain.

I can send you the domain name..let me know where and how so you can take a look at it.

Regards
Rajeev

Submitted by support on Thu, 2010-03-11 10:14

Hello Rajeev,

Sure, if you could email me a link to the installation; and your products.php and html/header.php as attachments I'll check it out for you...

Cheers,
David.

Submitted by fstore on Fri, 2011-06-10 13:56

I need to add the static description infront of product name on my page title. for example:
Currently My product page title is Product Title by default. I just want to add
"|Compare prices, get the best deal, buy cheap & save in Australia" infront of product title.

so if product title is "samsung TV",

Page title = samsung TV |Compare prices, get the best deal, buy cheap & save in Australia" infront of product title.

Thanks

Submitted by support on Fri, 2011-06-10 14:45

Hi,

Sure - in products.php you'll find where the page <title> is set by the following code at line 64:

$header["title"] = htmlentities($q,ENT_QUOTES,$config_charset);

...so you can REPLACE with:

$header["title"] = htmlentities($q,ENT_QUOTES,$config_charset)." | Compare prices, get the best deal, buy cheap and save in Australia";

(i've replaced "&" with "and" if that's OK as it's safer to use in page titles - the "&" character has various special meanings in both URLs and XML / HTML markup and can cause strange side effects if not handled correctly - not necessarily on your site but on other sites indexing or linking to you for example)

Cheers,
David.
--
PriceTapestry.com