Blogger Hacks, Categories, Tips & Tricks

Tuesday, September 20, 2005
Page Title Optimisation - Blogger Hacks, The Series
As a follow up to last week's rant about page titles, many thanks to Fritz at Cycle.icio.us for the best hack yet (I hope...)

Use that multi-purpose <$blogpagetitle> smart tag in your template? Have you ever wanted to mess with your page titles? Turns out that main & archive page conditional tags are valid in the head of your template as well as in the body. This means that you can replace the smart tag with a string that might work a little harder for you in the world o' the search engines. For instance... I read a couple of posts the other week about site name decreasing keyword relevance in page titles, & went off on a "how do you mess with that" rant. With Fritz's hack, you can omit the site name from your post pages completely or flip it to the back of the line. You can also expand the main page title with a bit of juicy content description.

How, I hear you cry?

Simply switch the existing page title string (probably <title><$blogpagetitle$></title> ) for this wonderful block of artfully combined blogger tags:

<head>
<MainOrArchivePage>
<title>Sitename: Site Description</title>
</MainOrArchivePage>
<Blogger>
<ItemPage>
<BlogItemTitle>
<title>
<$BlogItemTitle$> - Sitename Optional
</title>
</BlogItemTitle>
</ItemPage>
</Blogger>

then edit the plain text to suit your site. I don't know why it didn't occur to me that the conditional tags might be valid in the head as well as the body... I'm certainly glad that it occurred to Fritz!! Many Thanks!!

See other posts in Blogger Hacks: The Series
Filed In:
Posted at 6:21 PM by John.
24 Comments:
<    >
Blogger Rahul Kumar said...
do conditional tags work within $BlogItemBody$ so that I can have different postings displayed on the archive and item pages??

<    >
Blogger Solomon said...
Thats a lot for this hack. I know it will really improve my visibility in search engines

<    >
Blogger David said...
This is a really helpful trick. I was trying to figure out how to do this.

<    >
Anonymous Anonymous said...
Thanks for the great SEO information. And I've tried on my blog.

<    >
Blogger SJW said...
You guys are always there for me with an answer. This morning I wanted to finally get this done so I came to my favorite Blogger hack page and low and beyhold, you gave me the easy answer and it worked perfectly in 90 seconds.

Thanks.

<    >
Blogger amr said...
Thanks for the tip. I had some trouble at first because blogger was apparently acting up when I first tried to implement. Given recent history, I wasn't sure if it was my implementation or blogger. I tried again later and it works great. Now let's hope blogger can be more dependable!

<    >
Blogger amr said...
I should also add that I see no reason (unless you have a long description) not to use the "<$BlogPageTitle$>" tag in the code where you have "Sitename: Site Description" listed. Since you've got the conditional tags surrounding it already, you can make the title of your blog whatever you want on the appropriate settings change and it will be automatically inserted.

<    >
thanks alot, had difficulties finding your post about, but it was worth it.
Only thing I would like to change is that the archive title would be dynamic as well, any tips?

<    >
Blogger CiarĂ¡n said...
I'd love to implement this, but when I do I get the following message:

Your template could not be parsed as it is not well-formed. Please make sure that all XML elements are closed properly.
XML error message: The entity name must immediately follow the '&' in the entity reference.


???

<    >
Is <$BlogItemTitle$> the same as <$blogpagetitle> ? I don't seem to have the same code in my template, however this feature is exactly what I'm looking for.

<    >
Blogger Greg said...
I think this "smart tags" and conditional tags business has been superceded by the new blogger platform. As such, this hack may not work now.

Anyone else got a view?

In the meantime, here's a post on Ecmanaut explaining the similar functionality on the new platform.

<    >
Blogger Mark Michael Lewis said...
I am getting an xml error message saying my character data or markup is not well-formed, - with note that my tags are not closed properly.

here is what I have - where I am replacing "{" for "<" since I can't put html in my comments...
------
{head}

{MainOrArchivePage}{title}
Sitename: Site Description
{/title}{/MainOrArchivePage}

{Blogger}{ItemPage}{BlogItemTitle}{title}
{$BlogItemTitle$}
{/title}{/BlogItemTitle}{/ItemPage}{/Blogger} -----------------------

I can't tell what I am doing wrong, as it seems to be both the same code from this hack and just makes sense.
Any ideas?

<    >
Blogger Unknown said...
This will not work in the new blogger layout system... might be where you are going wrong, mark

<    >
Anonymous Anonymous said...
this one is for the old blogger. Anyone tips for new blogger? I'm not sure if "duplicate title tags" issue affect SEO but I just want to remove this problem and see how it goes for ranking. Thanks.

<    >
Blogger synical said...
Thanks so much!

<    >
Blogger brahmasoccer09 said...
Thanks a ton! I also used the PsycHo designer (which still uses old blogger) and wanted to add that title stuff to it. Thanks!
techinhiding.blogspot.com

<    >
Anonymous Anonymous said...
this won't apply to the new blogger.. please make a code for blogger. thank you so much
http://inday-stories.blogspot.com

<    >
Anonymous Anonymous said...
can this be applied to wordpresS???

<    >
Anonymous Anonymous said...
can we use this code as it or change it as our needs, thanks for nice guid and hack.

<    >
Blogger Shinto Mathew said...
Thanks a lot it really helped. I was searching for these for the past couple of days.
Thanks Again

<    >
Blogger Petal said...
Please forgive me for being a complete idiot. How do you do it??
Do I just paste and stick the code you have here or do I have to change something else.

<    >
Blogger Jeremyinc said...
Exactly what I was looking for. THIS IS FOR BLOGGER not wordpress, tools, lol

Thanks man, worked like a charm!

<    >
Blogger Unknown said...
Thank you

<    >
Blogger Harvey44 said...
Would kill for the version of this for new blogger! OK not kill, but I'd buy you a cheese burger...


eXTReMe Tracker