Some of you might have noticed this kind of placement of AdSense Units or other ads and widgets in the header section of the blog, one of the most popular format being the AdSense 468x60 ad unit.
Unfortunately, we are not always able to add widget inside the Blogger header as a Blogspot user. If we are using the Blogger's default template, or any other customized template available on the internet, the header usually is locked and have no option to Add a gadget inside it or next to the blog title.
The reason why some bloggers are using AdSense ads or different widgets in a blog header is because of its maximum of number of impressions. For instance, when a visitor goes to a page, this will be the first place where he would give a first look and this makes it one of the hottest spots in our blog.
But how we can add a gadget inside Blogger header - be it a AdSense unit, a search bar, social sharing buttons, or a widget? By simply adding a section in the blog's header. First off, to give space for the extra gadget to fit in, our blogger header should be resized.
To make a back-up, go to "Template" and look for the "Backup/Restore" button on the upper right side. Clicking on this button will prompt you to save your existing template as an XML file to your hard drive. You can change the name of the file and choose the location to ensure it is easy to find if you need to use this later.
Step 2. Click anywhere inside the code area and open the search box by using the CTRL + F keys:
Step 3. Add this HTML code inside the search box, then hit Enter to find it:
Step 4. Replace class='header' with class='header header-left'.
Step 5. Now we need to find the following line of code:
Step 6. Paste the HTML code below just ABOVE these two div tags:
Now, let's go one step forward and add an extra gadget section within our Blogger header!
Step 9. Just above the </head> tag, add this CSS code:
Step 11. Now go to "Layout" of your blogger blog and you should see two gadgets on the header area.
Don't worry if the "Add a Gadget" element doesn't appear side by side as every blogger template is different. They might be slightly up or down or sometimes they might overlap each other. Just make sure that you drag the newly created widget just below the "Header" section.
As I said before, the header section could be one of the most valuable places in a blog. In that gadget/widget you can add anything like AdSense ads, search boxes, social sharing buttons, or you could, as well, sell that space for advertisement to boost your income.
Unfortunately, we are not always able to add widget inside the Blogger header as a Blogspot user. If we are using the Blogger's default template, or any other customized template available on the internet, the header usually is locked and have no option to Add a gadget inside it or next to the blog title.
The reason why some bloggers are using AdSense ads or different widgets in a blog header is because of its maximum of number of impressions. For instance, when a visitor goes to a page, this will be the first place where he would give a first look and this makes it one of the hottest spots in our blog.
But how we can add a gadget inside Blogger header - be it a AdSense unit, a search bar, social sharing buttons, or a widget? By simply adding a section in the blog's header. First off, to give space for the extra gadget to fit in, our blogger header should be resized.
Important!
Before anything, please make a backup of your current Blogger template so that anything goes wrong, you can easily restore the original working template.To make a back-up, go to "Template" and look for the "Backup/Restore" button on the upper right side. Clicking on this button will prompt you to save your existing template as an XML file to your hard drive. You can change the name of the file and choose the location to ensure it is easy to find if you need to use this later.
Resize Blogger header
Step 1. Go to Blogger Dashboard, click on "Template" and hit the "Edit HTML" button.Step 2. Click anywhere inside the code area and open the search box by using the CTRL + F keys:
Step 3. Add this HTML code inside the search box, then hit Enter to find it:
<b:section class='header' id='header' maxwidgets=Note: If you can't find it, make sure that you have no blank space at the beginning of the line.
Step 4. Replace class='header' with class='header header-left'.
Step 5. Now we need to find the following line of code:
<div class='header-cap-bottom cap-bottom'>And just above this line, we should see two div tags:
</div>Note: if you have a custom Blogger template, you may not find the codes above and instead see the </b:section> tag right after the code from step 3. In this case, you need to add the codes from step 6 and 7 right after the </b:section> tag.
</div>
<div class='header-cap-bottom cap-bottom'>
Step 6. Paste the HTML code below just ABOVE these two div tags:
<div style='clear:both;'/>
Now, let's go one step forward and add an extra gadget section within our Blogger header!
Add a new gadget/widget element to the Blogger Header
Step 7. Just above <div style='clear:both;'/> (step 6)... add this code:<b:section class='header-right crosscol' id='header-right' maxwidgets='1' showaddelement='yes'/>Step 8. Now find this tag:
</head>
Step 9. Just above the </head> tag, add this CSS code:
<style>Note: if your widget is wider than overall area that both elements should occupy, then you might need to add the margin-right property to move it more on the right - see this example:
.header-left{
display: inline-block;
float: left;
}
#header-right {
display:inline-block;
float:right;
}
</style>
<style>Step 10. Press the "Save Template" button to save the changes.
.header-left{
display: inline-block;
float: left;
}
#header-right {
display:inline-block;
float:right;
margin-right: -20px;
}
</style>
Step 11. Now go to "Layout" of your blogger blog and you should see two gadgets on the header area.
Don't worry if the "Add a Gadget" element doesn't appear side by side as every blogger template is different. They might be slightly up or down or sometimes they might overlap each other. Just make sure that you drag the newly created widget just below the "Header" section.
As I said before, the header section could be one of the most valuable places in a blog. In that gadget/widget you can add anything like AdSense ads, search boxes, social sharing buttons, or you could, as well, sell that space for advertisement to boost your income.
You're welcome
ReplyDeleteyeah..nice post thanks 4 sharing.. hope u also like my blog
ReplyDeletewhen adding this i cant see my tittle even after add the other codes.
ReplyDeletehelp
Have you changed the values in red from step 4?
DeletePlease leave your link here to take a look. Thanks
To avoid messing up your template, i advise you to create a test blog and make the changes there.
DeleteHello again. I've tested on my blog and you haven't changed the value from step 4... so please add your gadget first (your Adsense ad unit, image, or whatever) and then change the value from "header-left" (set the height to 185px and width to 650px or higher)
DeletePS. you have already the code from step 4 (the one you should change) so please skip to the other steps. Good luck
Can this be done with social media icons as well?
ReplyDeleteYou can add almost any widget you want. Just paste your widget's code in the HTML/JavaScript box after you've followed the steps above. If needed go back and resize your header for your widget to fit in
DeleteHey, this worked really well but I'm struggling to get my social media icons to lay horizontal instead of vertical. I'm guessing it has something to do with the width/ height in step 4, but I've messed around with it for a while and no matter the numbers I use the icons stay the same.
ReplyDeleteHello Rachel,
DeleteThe left margin value of your social icons is too big.
Find this line in your template:
margin: 0px 0px 0px 585px;
Change 585 with 85 . I hope it works
Okay, you are some kind of crazy genius! Thanks so much; it worked like a charm!
Deletein 6th step it shows an error:
ReplyDeleteMore than one section was found with id: header. Section IDs should be unique
Hi Rahul, please verify if you have replaced the code from step 5 (see if you haven't something similar to it)
DeleteYou can search (CTRL + F) for this snippet of code id='header' - it should look similar with that from step 5. Delete and replace it.
DeleteThank you so much! This solved my problem... I used to be able to add gadgets and did so in the past year or so... all of a sudden this year I wanted to for the life of me I couldn't figure out what the problem was but this post helped solve the issue. Thank you so much for having this available. You're awesome!
ReplyDelete-Katya
Glad this worked for you, Katya. Thanks for the feedback :)
DeleteNo, That is not working. I have done all that but the widget is get added bellow the header and not side by side on the right. This looks so ugly as the total height of header is too much. Header plus widget height.
ReplyDeleteThanks for tricky steps to implement, I hope grab some more blogger tricks.
ReplyDeleteI like that.
http://www.techtipsntricks.com/
Thnks For this Wonderful post :)
ReplyDeletedude this did not work for my blog please help me.
ReplyDeleteThanks so much for your help, I can't believe how easy you've made it all seem. I'm finding my social media header too tall, but can't find how to make it narrower. Any tips would be appreciated, thanks Mandy
ReplyDeletehttp://londonportraitphotographer.blogspot.co.uk/
I tried all my effort to apply but not successful my url is http://it-allin.blogspot.com/ kindly assist me
ReplyDeletethanks
Sorry for the late reply. If you can't find all the codes - take each line in part, then search it. You should identify all the codes which look like the ones above. For example, at the step 7, search only for <div class='header-cap-bottom cap-bottom'> then seek for the rest of the code.
DeleteIf it's still not working, please send me a copy of your template at helplogger76@gmail.com. Thanks!
Any idea why I can put the widget up where the header widget is?
ReplyDeleteCan't, not can. Thanks!
ReplyDeleteExcellent tip. that's what i was looking 4 to add search bar in header.thanks a lottttt..
ReplyDeletethanks you for your sharing bro.100% work
ReplyDeleteHI
ReplyDeleteneed your help..at step 5 I have a problem.
Do not find..
I find
When I do replace...1/2 the header is gone..
Await your response..
Very helpful tutorial, neat and nice.
ReplyDeleteKeep sharing!
Hey, its not working, It is giving error. Please help.
ReplyDeletePlease send your template file at helplogger76@gmail.com
DeleteThanks
I have similar post here
ReplyDeleteHeader image in blogger
Thank You so much , this is veery helpful...
ReplyDeleteIt worked for me.It made my blog (www.incomesideas.com) more professional... You are truly a genius.. :)
ReplyDeleteAwesome tutorial thanks for sharing this :)
ReplyDeletereally usefull post. i tried it and it works like a charm.
ReplyDeleteI'm unable to add the gadget in the header, I want to add media share buttons, and email subscription bar in the header..pl. help me out...
ReplyDeletehttp://www.pepperbowl.blogspot.com
Thanx a lot i m looking for it
ReplyDeleteDon't work for me ._.
ReplyDeletenice post :D
ReplyDeletebut need a little help...
I want my blog logo image and the ad in one line...
See here
http://www.diigo.com/item/image/1haz1/cjqg
PLEASE HELp
I was able to do so by doing the following:
ReplyDeleteIn Section A, Step 6: Changing "maxwidgets" to how many widgets I needed, and changing "showaddelement" to yes.
Then in Section B, Step 3: Changing "maxwidgets" to the same number as the step above.
Hope this helps! It worked like a charm for me! :)
thanks for shearing this great article.....
ReplyDeleteThank You! I just added a new header widget box for my site http://www.qubeinfolab.in
ReplyDeleteWorked beautifully, and easily. Just one question, how do you add two gadgets to the header? I would like to have a search box and social media icons below, and there is plenty of room. Thanks so much!
ReplyDeletei want my that my own widget show on my web header left side then how can ajust there ? plz make a tut for this in this tut i did'nt found any image url?
ReplyDeleteWooow!! A very insightful and informative post. It is so on point. Am adding you guys to bookmark rightaway. Keep it up
ReplyDeleteHi
ReplyDeleteThis works better than others I've tried but unfortunately My logo come off the top no matter what size it is and the background disapears at the top when it should be black. www.therealmandem.blogspot.co.uk.
Can you help please?
Thanks
Guy, your information beat the rest. I have been trying to figure this out until I stumble upon this your post. It is working.
ReplyDeleteThanks a lot
Thank you. This worked great!
ReplyDeleteThanks madam. You are very amazing. It's works! thanks again ;)
ReplyDeletei dont have a header widget
ReplyDeleteDude that 100% working Just follow the steps carefully that is working for me..
ReplyDeleteif you get positoin error
at
.header-right {
display:inline-block;
float:right;
width:400px;
}
just change the width as 550 it get exact position that you want.
try it.
I couldn't get it to work. It gave me an extra gadget but they aren't side by side. When i add stuff it's under the header.
ReplyDeleteHi...
ReplyDeleteSuch a nice post on how to add a widgets/gadgets in blogger's header.
Thank you so much for sharing...I get all my doubts about blogging cleared here... thanks again..
ReplyDeleteIts not working..Please help me!!!
ReplyDeleteThanks For sharing this very easy to understand, I was searching for this whole time, thanks again.
ReplyDeletecan't find /* Header
ReplyDeleteMy layout has changed so that the header gadget has moved to the side and there is room or another gadget box, however the gadget box isn't there so I'm still unable to add anything. Any thoughts on what I might be doing wrong? Thanks
ReplyDeleteHi Admin, I have the tech blog and added visitor counter. But, I have seen it also count my visit also. So can you help me to refine those visits?
ReplyDeleteThanks !!
Avinash Kumar
Tech Tips
hello
ReplyDeleteadmin can you modify my blogger template?
and thank you
Hi, I need some help! Do I have to add the icons to my header on photoshop first or just follow the instructions?
ReplyDeleteOKAY so i followed all the steps byt instead the add gadget being next to header it was under and I'm not being able to move it. Did I miss something?
ReplyDeleteThanks for providing these info. you have fixed my problem.
ReplyDeleteThank You! But I Want to put header in a custom box.
ReplyDeletewindowstechnics
Okay, so I have VERY limited understanding of code but this morning when I changed the name of my title/header in blogger, the whole title has disappeared, any ideas what is up? It shows up in the mobile app window as visible but not on the blog, so frustrated.
ReplyDeletethiessen_robyn@surreyschools.ca
Hi, i have done what ever you have said but all my efforts are in vain , could you please help me out this my email id is vipuls1979@gmail.com , i could also send you my blog template if you want
ReplyDeletePlease help me when I want to change the html code, the code does not change:
ReplyDeleteMore than one widget was found with id: Image7. Widget IDs shoulds be single.
hey man u explained it very well.I did every step but couldn't see additional widget ?any ideas.
ReplyDeleteI tried but it is not working, the header will not move, it stays in the same place in the layout.
ReplyDeletehey... i tried thrice but its not working on my template .. iwant some space beside my header for other links in right side ..can u help me
ReplyDeletehttp://rasmainexam.blogspot.in/
i can send u my template ! thanks in advance
not working yar see
ReplyDeletehttp://testrasexam.blogspot.in/
help me anyone
This still doesn't work.
ReplyDeleteNice post an d trick
ReplyDeleteI should to make done with this trik
greatifull.. i have not ever see about this before
Thank you so much you just solved my problem
ReplyDeleteEvery blog does not contain the same code inside, It can be found as #header then we can make changes in its width and height as well. Although, I didn't try your instruction, but It is my personal experience. Well, Thanks for sharing this, keep it up.
ReplyDeleteRegards,
Divya @smtutorial
cant find the codes in Step 5 and 7
ReplyDeleteThanks for your awesome tutorial, I have managed to get most of it right, but I can not get the new widget to sit in the top right corner of my page..... www.jazskimogetsfit.com Could you please help? :)
ReplyDeletePlease make sure that you dragged the widget just below/on the right side of your header, because it shows me that you added it on the tabs area (which is a little more further than the header section). After you have dragged it, click on the Save arrangement button on the right side.
DeleteIf it still appears below, you can add a style for it so that it would float more on the right:
Go to Template > Edit HTML and add this code just above the ]]></b:skin> tag:
#HTML3 {display: inline-block; float: right; margin-top: -100px;}
Change the -100px value to make it move closer to the top of your page.
I hope this helps. Thanks for visiting!
Thanks so so so much! That fixed it! Love your blog :)
DeleteYou're welcome ^_^
DeleteI need your help, the last step change nothing at my layoutmenu .. :(
ReplyDeletehttp://www.fotos-hochladen.net/view/unbenannthfd65vxmiz.jpg
here you can see what I mean
Pleas help! Lori
Hi Lori,
DeleteThe page elements might look a bit different from a layout to another depending on the other declarations used for each element. However I see that you managed to add an element on the right of your header. If you want to move it more to the top, add this above ]]></b:skin>
#header-right {margin-top: -50px;}
You can change the -50px value to make it aligned with your header.
I have just done this a couple of times and received no errors, however I have seen no change? Strange. Any advice? Thanks!!
ReplyDeleteHi Alexis,
ReplyDeletePlease check that you added the code from step 6. You can search for it by using CTRL + F. In case you can't find it, search for <div class='header-cap-bottom cap-bottom'> and add it above the two divs and <div style='clear:both;'/> (step 5).
Hey, It's not working on my blog, I did it already how many times.... Can you help me? Please
ReplyDeleteHi, I have followed the steps but it has added a gadget below my 'Blog Title' and above my 'Menu Bar'. I want it to be above my 'Blog Title', how can I edit it to adjust?
ReplyDeletehttp://isabellesminicloset.blogspot.co.uk/
hello,
ReplyDeletei have fallowed all the steps but this trick doesn't works..plzz help
really helpful post for beginner ..thanks.
ReplyDeleteThanks a lot, it really worked on my blog:
ReplyDeletehttp://ngoandtaxconsultant.in/
very useful. thanks a lot.
ReplyDeleteHi, I followed your instructions and was able to add an extra gadget area within my blog layout (I had used all the ones in my template). However, it went underneath my header instead of beside it. Not sure what to do to get it beside. Could you please help.
ReplyDeleteThanks
Cindy
www.diybeautify.com
So, funny thing. I just decided to try it out anyway and it put my gadget into my header! YAY! However, I'm not sure the alignment looks right. If you have a second to check it out and get back to me with any tips, I'd really appreciate it. Thanks :) :)
ReplyDeleteCindy @ DIYbeautify
Hi Cindy,
DeleteYou could move it more to the left by adding this code below #header-right {:
margin-right: 85px;
Thanks for visiting! :)
After much searching, only your post manage to save my blog! Thank you loads!
ReplyDeleteGreat post, very clear. For some reason it didn't work for me, though. Did everything up to, and including step 10, but there weren't two gadgets on the header area :(
ReplyDeleteI can't find this code in my template <div class='header-cap-bottom cap-bottom'>
ReplyDeleteplease help me thank you in advance
i have tried. not working. need help.
ReplyDeletei have sent you XML files. PLZ HELP.
hi admin, i am unable to do from step 4. Plse check my blog www.kareducation.in. i want to add 728*90 adsense code to right of the header.
ReplyDeletewaiting for ur response
Have you tried to replace class='header' with class='header header-left'? If you received an error afterwards, please make sure that you left blank spaces before and after class='header header-left'
DeleteSeriously . Awesome stuff. tried for actually 4 long hours and finally got it rite.. needs a bit a tweaking and testing so that you get it rite..! :)
ReplyDeletehttp://deskback.blogspot.in/
Hi, I'm wondering how to get my header image to align left again? I've been looking everywhere and I can't seem to find the information I need. I changed it to center align and now I can't seem to change it back.
ReplyDeleteThanks.
How to remove gadget/widget from my blog header? I want my blog logo occupy entire width of Header. Please help me....
ReplyDeleteCan't find the header-cap-bottom cap-bottom anywhere.
ReplyDeleteHi Anna,
DeleteThe code might look different if you are using a custom template. Try to add the code above the tag (instead of 'header-cap-bottom...') and specify the width to both .header-left and #header-right - for example:
.header-left{
width: 400px;
}
#header-right {
width: 300px;
}
See if it works this way. Don't forget to make a backup before proceeding.
it says something like this
ReplyDeleteError parsing XML, line 931, column 3: The element type "header" must be terminated by the matching end-tag ""
www.peacelessons.blogspot.com
thank you a lot....it works good for me
ReplyDeletehttp://matitumbi.blogspot.com/
I tried given steps but Add a Gadget option is showing below the header.. not with the header in my web blog www.ssc-cgl.in .. I am sending you HTML coding of my website over mail ... please check it & revert me... Thanks in advance for your kind help... May god bless you always.. :)
ReplyDeleteThe new gadget is under the header, not beside it, help please
ReplyDeletei am sure i followed the steps accordingly.. but doesn't seem to change, help
ReplyDeleteI'm visit of your site since more than 1 year and i really like your all posts and first of all your best template design love it. But now i have a problem if you please solve for me because i know you can...
ReplyDeleteI'm showing you screenshot of my header or above fold and i want to place a adsense ads on right side which i showed in picture you can see but there is no option or place.
Please see the attachment links/pictures you will understand.
First Screenshot. http://prntscr.com/4nba2f
Second Screenshot http://prntscr.com/4nbcfr
This is my blog: http://allbanglaboi.blogspot.com/ i can't move widget in blogger layout. when i drag and drop any widget in layout page its hind from page, then refresh the page it come in same position . what i will do now.
ReplyDeletesorry for bad english.