Changing Blogger title for Postpages.

Changing Blogger title for Postpages.

Ashwini Khare - Monday, July 23, 2007 -

In recent, I have changed the title of my blog' home page to Webtalks- Blogging,Online Money Making,Tech Tips wheras the title for Post pages{Itempages}is Post title ~Webtalks. This has given a major boost to my Search Engine rankings.Now the question is How do I have two separate titles for the same blog's homepage and post page.
By default, your Blogger's title on the top left displays your blog title, and if it's in the items page, it'll include your post title as well.eg, Webtalks:Changing Blogger Title for Postpages.By copying the coding from below, you can change the default behavior of the title tag.

Step 1-Goto Blogger Dashboard>>Layout>>Edit Html

Step 2-Backup your template
Step 3-Follow the instructions below

Find this code in your XML template{in header}

<title><data:blog.pagetitle/></title>

Now replace it with

<!-- Start Widget-based: Changing the Blogger Title Tag -->
<b:if cond='data:blog.pageType == "item"'>
<b:section id='titleTag'>
<b:widget id='Blog2' locked='false' title='Blog Posts' type='Blog'>
<b:includable id='comments' var='post'/>
<b:includable id='postQuickEdit' var='post'/>
<b:includable id='main' var='top'><title><b:loop values='data:posts' var='post'><b:include data='post' name='post'/></b:loop> ~ <data:blog.title/></title></b:includable>
<b:includable id='backlinkDeleteIcon' var='backlink'/>
<b:includable id='feedLinksBody' var='links'/>
<b:includable id='backlinks' var='post'/>
<b:includable id='status-message'/>
<b:includable id='feedLinks'/>
<b:includable id='nextprev'/>
<b:includable id='commentDeleteIcon' var='comment'/>
<b:includable id='post' var='post'><data:post.title/></b:includable>
</b:widget>
</b:section>
<b:else/>
<title><data:blog.pageTitle/></title>
</b:if>
<!-- End Widget-based: Changing the Blogger Title Tag -->

Further more you can add a very good keyword in homepage's title by just adding Keyword + Blog Title by finding this line in the above code{3rd last}-

<b:else/>
<title><data:blog.pageTitle/></title>
</b:if>

and adding keyword here

<b:else/>
<title> Keyword <data:blog.pageTitle/></title>
</b:if>

this functionality can be used to give you blog homepage title like "make money online with Webtalks!" and post title like "Changing Blogger title for Postpages at Webtalks"

Note- Installing the above code will not change title for Archives Page as well as Labels page

Credits :Widget Based

23 comments:

Marlowe said...

Thank you SOO much for writing this post! I spent all last weekend trying to write this little snippet and couldn't get it to work right.

Noor Azman Othman GBE said...

Hi!

I got it working but I can't save anything on the page elements. Any idea why?

For now I got to delete it or else I cannot add and save anything. It's a great hack if you got it working!

Anonymous said...

thats cool, thanks for sharing that .


http://adsenselt.blogspot.com
http://togetmoney.blogspot.com
http://quantumincome.blogspot.com

Lance Eh. said...

Awesome! It works. This is so cool, thank you, exactly what I was looking for! How did you get a boost in search engines? Was it for the individual pages or the overall main page? For me, I don't get any hits on my main page but I do for post pages and hopefully this should help a lot! Thank you so much!

Noor,
You might need to log out and log back in our try another browser or restart your PC. This has happened to me before in Blogger. I think it's something to do with Blogger and internet explorer, not the code. But I haven't checked so I'm not sure but I have done tons of changes to the default template but can still play with the page edits and fonts and colors, something I really love about Blogger because they do have a great system setup. Thanks so much again! God bless!

minksti baldai said...

The best one I ever read !!!

Lin Neiswender said...

I get an error when I try to replace my title, error 404 not found. I am just copying and pasting so any help you can give would be appreciated as I want to use this!

Lin Neiswender said...

BTW I'm using the latest Firefox not IE. It told me the code was malformed.

Lin Neiswender said...

I had to unwrap some of your lines of code to get this to work. I can't tell yet if it had "taken" or not. When I tried to edit my header to add a description in the template, I got an error but that may be unrelated to this. Here's hoping!

Glenn said...

Sir, i used your code it works well on my blog.. it gives me traffic since am using keyword on my page title.. God bless for sharing this tip.

Catholic Church Prayers said...

Hi thanks for this tip. How about having the post title in the keyword meta tag, do you know of any workaround?

Svetoslav Marinov said...

Thanks :)

Svetoslav
http://devcha.blogspot.com/

Anonymous said...

thanks
http://8download.blogspot.com/

cheks900 said...

I GET IT! this one i understood and it did it for my blog.

Anonymous said...

this doesn't work any more... section is not allowed in head tag

kingtravelling said...

ToAnonymous:

Try to use default template, i had the same problem with nonDefault one.

weight said...

good info..
i'll try it.
thanx..

seguy said...

I tried it with my present as well as with a default template , but it keeps saying that the template is invalid because the tag 'b:section' appears inside of the tag 'head'.Any help with this ?

seguy said...

Hey Ashwini,

I still haven't been able to successfully add that code to my blog http://onlinewealthguide.blogspot.com , but from a google search for an alternative I landed on a blog that seems like plagiarizing your post. Here's the link in case you want to check it : plagiarized blog

Anonymous said...

This won't work because blogger has depriciated this hack.. You can't use Blog2 widgets in blogger ..

Vik said...

Hi Ashwini, I finally managed to make the change to page title on my third party template but I used a simpler code here.Thanks for this very useful post that got me looking mate!

sprasanna199 said...

Hi Friends,

Today I was looking to solve this title problem, fortunately the solution is so simple with Blogger's latest fix, do visit here for the solution.

http://www.prasannatech.net/2008/05/blogger-changing-title-for-blog-posts.html

sprasanna199 said...

Sorry if you cant see the full link above, do look for my latest post in May

http://www.prasannatech.net/2008/05/

sprasanna199 said...

Solution in my blog

http://www.prasannatech.net/

Sorry for the multiple entries but didn't know that

http://www.prasannatech.net/2008/05/ wont work :)