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: google blogger search blogsearch blogging blogger-hacks SEO
Thanks.
Only thing I would like to change is that the archive title would be dynamic as well, any tips?
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.
???
Anyone else got a view?
In the meantime, here's a post on Ecmanaut explaining the similar functionality on the new platform.
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?
techinhiding.blogspot.com
http://inday-stories.blogspot.com
Thanks Again
Do I just paste and stick the code you have here or do I have to change something else.
Thanks man, worked like a charm!