Change a title tag?
-
SiteOptimized
- Regular
- Posts: 5
- Joined: Thu Dec 07, 2006 6:44 pm
Change a title tag?
Is there a way to modify a title tag or does it have to be exactly as the blog entry?
Thanks!
Thanks!
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
I spoke extensively with this user via telephone this evening. He is someone I know (and others probably know) to be a strong believer and supporter of s9y, so let's give him our collective best!
His question is in the context of search engine optimization (SEO). He wants the generated source to produce the best possible SERP result on a "per entry" basis.
Most index.tpl files generate an html <title> like this:
On a start page, that will render just the blog's title. For entries, the <title> will be [ENTRY TITLE] - [BLOG TITLE].
We have a HTML nugget plugin that can hook into <head>. What this user would like is the ability, perhaps via a radio button/checkbox, to fully override the normally generated <title> tag, on an entry-by-entry basis, with whatever might be user-supplied for a given entry. By doing this, each entry page could have a unique <title> that is something other than the entry title followed by the blog title.
A sub-part to this request is how the HTML nugget plugin already functions. For code inserted into the <head>, it seems the plugin inserts the head nugget just prior to the head closing tag - </head>. This is not as search engine friendly as it could be. There could be a lot of code, such as multiple stylesheet links, scripts, etc, hard coded into a given index.tpl.... which might make valuable head nugget content, such as meta keywords, or meta descriptions (both quite valuable to search engines) come well after <title>. Can the existing plugin be modified to insert head nugget content directly after <title> rather than just prior to </head>?
In summary, there are 2 requests:
1) Fully override the normally rendered <title>blah blah</title> with a user supplied string *IF* provided by a given entry.
2) Insert head nugget content directly after <title>?
His question is in the context of search engine optimization (SEO). He wants the generated source to produce the best possible SERP result on a "per entry" basis.
Most index.tpl files generate an html <title> like this:
Code: Select all
<title>{$head_title|@default:$blogTitle} {if $head_subtitle} - {$head_subtitle}{/if}</title>We have a HTML nugget plugin that can hook into <head>. What this user would like is the ability, perhaps via a radio button/checkbox, to fully override the normally generated <title> tag, on an entry-by-entry basis, with whatever might be user-supplied for a given entry. By doing this, each entry page could have a unique <title> that is something other than the entry title followed by the blog title.
A sub-part to this request is how the HTML nugget plugin already functions. For code inserted into the <head>, it seems the plugin inserts the head nugget just prior to the head closing tag - </head>. This is not as search engine friendly as it could be. There could be a lot of code, such as multiple stylesheet links, scripts, etc, hard coded into a given index.tpl.... which might make valuable head nugget content, such as meta keywords, or meta descriptions (both quite valuable to search engines) come well after <title>. Can the existing plugin be modified to insert head nugget content directly after <title> rather than just prior to </head>?
In summary, there are 2 requests:
1) Fully override the normally rendered <title>blah blah</title> with a user supplied string *IF* provided by a given entry.
2) Insert head nugget content directly after <title>?
=Don=
-
carl_galloway
- Regular
- Posts: 1331
- Joined: Sun Dec 04, 2005 5:43 pm
- Location: Andalucia, Spain
- Contact:
1. I need more information about what will be in the title before I can give my answer. A simple template change may be all that is required, or a radio button might be needed, so, what exactly is required for the title?
2. in index.tpl. move {serendipity_hookPlugin hook="frontend_header"} to just under the <title>
2. in index.tpl. move {serendipity_hookPlugin hook="frontend_header"} to just under the <title>
-
SiteOptimized
- Regular
- Posts: 5
- Joined: Thu Dec 07, 2006 6:44 pm
Here is the final objective: we would like to have the title tag be customized on a need-to basis so that people who are searching through Google, MSN, Yahoo and Ask.com can find entries easier.
In order to have a web site be presented at the top of the search engines, it is most helpful to have the keyword phrase in the title tag:
< title > Our Blog Entry About Using Blue Widgets < / title >
in this example, the Search engines might display this blog entry prominently in their search engine results page when someone types in "using blue widgets".
However...this MIGHT not be the ideal title of the blog entry for the user already reading the blog. The best title for the person reading the actual blog entry might be: "Using Our Latest Product Offerings". Blue widgets is not mentioned because it is not the perfect fit for displaying on the blog entry though it would certainly be appropriate to display it in the search engine results page as people have yet to enter the blog when they are simply scanning a list of search engine results.
The challenge with Serendipity is that title tags are generated strictly by the title of the entry plus the name of the blog. This is not always helpful for people doing research via the search engines.
The good news is that the Serendipity community is awful clever! and I have confidence that some day someone will figure out a way to modify the title meta-tags of the blog entries and make it easier for people to find the information that they are seeking.
In order to have a web site be presented at the top of the search engines, it is most helpful to have the keyword phrase in the title tag:
< title > Our Blog Entry About Using Blue Widgets < / title >
in this example, the Search engines might display this blog entry prominently in their search engine results page when someone types in "using blue widgets".
However...this MIGHT not be the ideal title of the blog entry for the user already reading the blog. The best title for the person reading the actual blog entry might be: "Using Our Latest Product Offerings". Blue widgets is not mentioned because it is not the perfect fit for displaying on the blog entry though it would certainly be appropriate to display it in the search engine results page as people have yet to enter the blog when they are simply scanning a list of search engine results.
The challenge with Serendipity is that title tags are generated strictly by the title of the entry plus the name of the blog. This is not always helpful for people doing research via the search engines.
The good news is that the Serendipity community is awful clever! and I have confidence that some day someone will figure out a way to modify the title meta-tags of the blog entries and make it easier for people to find the information that they are seeking.
-
carl_galloway
- Regular
- Posts: 1331
- Joined: Sun Dec 04, 2005 5:43 pm
- Location: Andalucia, Spain
- Contact:
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Update: The original functionality requested is all fully operational. Carl took my prototype "out for a test drive" earlier this evening and will hopefully send me any feedback.
I have decided to add some functionality that was not requested - default meta descriptions and meta keywords for all other pages. This plugin currently supplies meta data for single entry pages, which means any page served with more than a single entry does not benefit from any description or keyword. I have that nearly operational as well, but am awaiting a tiny bit of input from Garvin, which I will hopefully receive via PM tomorrow morning.
I have decided to add some functionality that was not requested - default meta descriptions and meta keywords for all other pages. This plugin currently supplies meta data for single entry pages, which means any page served with more than a single entry does not benefit from any description or keyword. I have that nearly operational as well, but am awaiting a tiny bit of input from Garvin, which I will hopefully receive via PM tomorrow morning.
=Don=
-
carl_galloway
- Regular
- Posts: 1331
- Joined: Sun Dec 04, 2005 5:43 pm
- Location: Andalucia, Spain
- Contact:
-
carl_galloway
- Regular
- Posts: 1331
- Joined: Sun Dec 04, 2005 5:43 pm
- Location: Andalucia, Spain
- Contact:
I installed this plugin on my blog this morning and made a few changes to some entries, a couple from within the admin so the show up in the feed, and a few from phpMyAdmin so they don't show up in the feed, and I can confirm that three hours later all of the pages updated using this plugin have been reindexed with the new title instead of the default blog title. It will be interesting to see if having a different title tag from the h1 will make any difference. The SEO community seems to believe it should so we'll see.
-
carl_galloway
- Regular
- Posts: 1331
- Joined: Sun Dec 04, 2005 5:43 pm
- Location: Andalucia, Spain
- Contact:
Well, after several hours of playing around with Don't plugin update, I can happily confirm that it does indeed seem to be working.
I won't be mentioning the keyword I selected, but I've been hovering around 3rd or 4th position in Goggle for one of the lesser know s9y keywords, right behind s9y.org, but after the latest crawl it seems I'm back up in #1. So I think this plugin might be a winner. Now before anyone gets upset, the keyword is very rarely searched for, and my page links to the s9y.org page anyway, so the project won't be losing traffic over it.
I won't be mentioning the keyword I selected, but I've been hovering around 3rd or 4th position in Goggle for one of the lesser know s9y keywords, right behind s9y.org, but after the latest crawl it seems I'm back up in #1. So I think this plugin might be a winner. Now before anyone gets upset, the keyword is very rarely searched for, and my page links to the s9y.org page anyway, so the project won't be losing traffic over it.
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Thanks for the update Carl! I hope to get the default keyword and description stuff operational soon.
Meanwhile, I checked out your site to see if everything was working as expected... and it is. I also see that you have a hard-coded meta description, probably in your index.tpl or as a head nugget.
Is there a downside or upside to the fact that, when using this plugin as it currently stands, entries that have their own meta description have a page source that includes BOTH your hard coded meta description and the entry meta description?
BTW - why would having a different title tag from the h1 be a GOOD thing? I thought the only real issue was that it was beneficial to simply HAVE an h1 tag, not that it be beneficial to have one, and have it be different from the page <title>.
Meanwhile, I checked out your site to see if everything was working as expected... and it is. I also see that you have a hard-coded meta description, probably in your index.tpl or as a head nugget.
Is there a downside or upside to the fact that, when using this plugin as it currently stands, entries that have their own meta description have a page source that includes BOTH your hard coded meta description and the entry meta description?
BTW - why would having a different title tag from the h1 be a GOOD thing? I thought the only real issue was that it was beneficial to simply HAVE an h1 tag, not that it be beneficial to have one, and have it be different from the page <title>.
=Don=
-
carl_galloway
- Regular
- Posts: 1331
- Joined: Sun Dec 04, 2005 5:43 pm
- Location: Andalucia, Spain
- Contact:
Hmmm, I think the meta description might be a conflict with the html head nugget, I'll need to remove that, thanks for the heads up. BTW, if you can add something to your plugin that allows a default title/description for overview and archive pages that would be grand.
Sorry about the title and H1 thing, I've actually done some other experiments with my site, in the default template the entry title is both an H1 an an H3/H4 I can't remember exactly which, but in my template the entry title is only an H1 on the detail page, and on the overview page it isn't even a header tag at all, it's just a regular paragraph. I did this to reduce the prominence of the overview page in the search results in favour of my detail pages. It has worked, several pages have been dragged out of the supplementary index by doing this. Frankly I don't want my frontpage to even be in the index. With Live.com, yahoo and Ask it isn't as much of a problem, but with Goggle, massive problem.
Sorry about the title and H1 thing, I've actually done some other experiments with my site, in the default template the entry title is both an H1 an an H3/H4 I can't remember exactly which, but in my template the entry title is only an H1 on the detail page, and on the overview page it isn't even a header tag at all, it's just a regular paragraph. I did this to reduce the prominence of the overview page in the search results in favour of my detail pages. It has worked, several pages have been dragged out of the supplementary index by doing this. Frankly I don't want my frontpage to even be in the index. With Live.com, yahoo and Ask it isn't as much of a problem, but with Goggle, massive problem.