Monday 10 March 2008

Swap Blog Title and Post Title on Blogger

Your template is invalid because the tag 'b:section' appears inside of the tag 'head'. This error appears because of hack. I think there was some changes on Blogger. To fix that error, you need to do the same hack: Swap of your blog title and post title, but with some changes.

Just follow the steps:

1. Go to dashboard ==> 'Layout'==> 'Edit HTML' and backup your template.

2. Find this line: <title><data:blog.pageTitle/><title> and delete it.

3. Find <head> code and put this code BEFORE <head> :

<!-- newtitle -->
<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='nextprev'/>
<b:includable id='backlinks' var='post'/>
<b:includable id='post' var='post'><data:post.title/></b:includable>
<b:includable id='commentDeleteIcon' var='comment'/>
<b:includable id='status-message'/>
<b:includable id='feedLinks'/>
<b:includable id='backlinkDeleteIcon' var='backlink'/>
<b:includable id='feedLinksBody' var='links'/>
<b:includable id='postQuickEdit' var='post'/>
<b:includable id='comments' 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:widget>
</b:section>
<b:else/>
<title><data:blog.pageTitle/></title>
</b:if>
<!-- end newtitle -->

4. Save your changes.

PS: 

I'm not recommending you to do this hack, because, usually, Title code must be after <head>. So I don't know what kind of effect it will give to you. I think it is better do use simple basic <title><data:blog.pageTitle/><title>  code.

12 comments:

Unknown said...

thank you..ive been looking for this for a long time now!! currently im using this in my site http://animebrowser.blogspot.com again thanks =)

Nick said...

Thank you, your solution also fixes the bX-ti1gkd error message I've been getting while trying to change page layouts. I remove the code from the edit html page edit my page layout then put the code back. Not the ideal solution but it works for me.

Buck said...

did not work for me. it just converted the new tag back to the old tag.

Jay said...

Thank you very much. It worked.

Dahlia always... said...

erm...i dun understand it...i tried repharasing it but hah...it didnt worked out well...erm...this is the website n i want this skin...cud you help me...you noe...erm...edit it???pls....then you could copy n paste the editted copy here...hope tat you're not to busy..haha...well, if you do help me, then thx!!!

Mr. Geek said...

I can help you, but pls tell me what do you want to edit? skin? (I think you mean template or layout)

asmo said...

it worked for me thx. But i have one question. Does googlebot index titles ouside "head" section ?

huamulan said...

I did this, too. It works but now when you view the source code, there's two titles, because as you sed, the title should not be outside the head.

My question: Is there any other way to swap titles?

Thanks ^^

geraldine :D said...

heyy, i need yr help..can you help me to edit the html..? coz i faced the same prob as e others-the "Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The element type "img" must be terminated by the matching end-tag "".'' ... if you can, pls email me @ crystal_445@hotmail.com. thx..coz every blogskin i try also same result... =( thanks again! hope to hear frm you soon! (:

Ann Donnelly said...

Thanks, it's working for me. Now can you make it so that when someone views postings by label -- label comes at the front of the title tag? Thanks.

Anonymous said...

it didn't work in the layout. But still good , thanks

Shivbhadrasinh Gohil said...

Thanks....
Its working...