WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => Bakery Shop => Topic started by: svsanchez on September 01, 2013, 06:47:33 PM

Title: Bakery - Product name in PAGE TITLE tag?
Post by: svsanchez on September 01, 2013, 06:47:33 PM
Hello bakers, I noticed that Bakery product pages don't have a title with the product's name on it, so if I have for example 10 products on my Bakery shop each of them have the same title and description tag which obviously won't do any good in terms of SEO. I guess this is something already covered in the forum but maybe due to my limited English I couldn't find the right keywords for finding the solution, so could someone please tell me how to implement this.

I tried adding [TITLE] in my title tag but this didn't work :(

Thank you!
Title: Re: Bakery - Product name in PAGE TITLE tag?
Post by: jacobi22 on September 01, 2013, 07:20:29 PM
try simplepagehead (http://www.websitebakers.com/pages/modules/various/simple-page-head.php)
Title: Re: Bakery - Product name in PAGE TITLE tag?
Post by: svsanchez on September 03, 2013, 02:19:35 AM
Hello Jacobi, thank you for your reply. I have installed simplepagehead and it's only half working: I do now see the product name on Bakery pages, but not the name of the site. I checked the source and found around line 233 the following line which I assume should be adding the Site Title to the Page Title:

if (strlen($the_title) < 15) {$the_title = $the_title. " - " .WEBSITE_TITLE; }

What I don't understand is why it seems to be telling it to do this only if the $the_title is less than 15. I thought about asking here before changing that.

One important thing about simplepagehead: it says to comment the encoding line in the headers, but since my site is in Spanish doing this broke all my accented characters, so I uncommented my UTF-8 line and it still works without showing strange things in the accented characters :)
Title: Re: Bakery - Product name in PAGE TITLE tag?
Post by: jacobi22 on September 03, 2013, 09:52:33 AM
i use 25 for the counter

Code: [Select]
if (strlen($the_title) < 25) {$the_title = $the_title. " - " .WEBSITE_TITLE; }
but be carefull, the browser cut the title in the top of the browser window, if he is to long, you need the "golden middle"  ;-)
Title: Re: Bakery - Product name in PAGE TITLE tag?
Post by: svsanchez on September 03, 2013, 07:07:26 PM
Hello Jacobi, thank you for your recommendation. I don't care if the browser cuts the title as long as Google gets it right!
Title: Re: Bakery - Product name in PAGE TITLE tag?
Post by: jacobi22 on September 04, 2013, 01:11:17 PM
Hello Jacobi, thank you for your recommendation. I don't care if the browser cuts the title as long as Google gets it right!

try it  ;-)
(the problem is not the google title, the "problem" is the page design in the browser window, there is no place for a title with 80 chars. in my project i have a short WEBSITE_TITLE and short page_titles in the shop pages, so i can use the counter 25 for $the_title in simplepagehead. play a little with this counter and find your limit