How to put Adsense Link unit in your Header. ~ The Blog Doctor.

How to put Adsense Link unit in your Header.

New Visitor? Like what you read? Then please subscribe to my Blog Feed or sign up for Free Email Updates. Thanks for Visiting!

To put an Adsense Link Unit Ad. in the header..........

Log in to your Dashboard. Click on your 'Layout' link under your blog name. This takes you to Page Elements under the Template tab. Click on Edit Html. Scroll down in Edit Template field till you come to :

<div id='header-wrapper'>
<b:section class='header' id='header' maxwidgets='2' preferred='yes' showaddelement='yes'>

Change the second line to be the same as the second and third lines above.
Save Template.
Go to Page Elements subtab.
Now you will see in the Header Section an 'Add Page Element' link.
Click on the link and in the popup window choose Html/Javascript.
Paste your Adsense 728 by 15 Ad. Javascript code in Content field.
Save. The Ad. unit is placed above the Title unit.
Click and drag this to below the Title unit.
View blog.

Technorati Tags:, , , ,


Anonymous said...

Thanks very much for this hack. It refuses to be dragged below the title unit. But I'm happy with it on top; just wanted to know. You're at the top in my "Must Visit" sites in the side column.

Anonymous said...

I tried this but can't get it to work a I can't drag the ad unit below the header it just keeps jumping back above the header?

in your description it says
Change the second line to be the same as the second and third lines above.
Is the 3rd line missing?

starfire said...

I don't understand your direction, you said to change the second line to be the same as the second and third lines above. Could you explain for me.


vin said...

The second line in your header wrapper code will not contain this :

maxwidgets='3' showaddelement='yes'

So copy the code given instead of the second line. OR put these in the second line.

Anonymous said...

i can't figure out how to get the page element to appear ABOVE the header rather than right on top of it. any ideas?

Anise Ghorbani said...

for some reason, i can't drag the adsense block i put in under the title, i can drag it around, but it won't go under the title! Can someone help me please?

Anise Ghorbani said...

nevermind, i got it to work by removing the "maxwidgets" parameter altogether. Thanks for the great info!

Anise Ghorbani said...

Hey, I was wondering how to center the adsense block in the header? My site is

As you can see, there's no space on the left of the adsense block on the header. In fact, while we're on the subject, how do you center anything? Another example is that little "" box i have at the bottom of the page, how do i center that?

While I'm at it, instead of putting the adsense at the header, how can one go about putting an ad between the 2nd and 3rd posts?

Thanks so much if you can help, I love your site and all the info!

Coaster said...

Can you tell me if you can have more than 3 adsense ads?
I want to add adsense to the bottom of each post. I found out how to do it but they are only inserted into the first three posts and all ads on the side are then masked out?
same goes for add on the side if I try for mor than three (small graphic boxes) the rest don't appear.
All I want is a graphic ad on the bottom of each post and a few ads on the side bar.
the site I want it for is


vin said...


Your Ads. are most effective when they are above the 'fold' which is the viewable area of the blog without having to scroll down.

There is a limit on how many Ads. will appear. See :

Mauibob said...

Thank you for the great tip. For some reason I am not able to move the adssense widget below the header widget. Can you help?

Funky Downtown said...

Hi, Vin, I had added 3 Adsense links on Post Blog (body) by a CHECKED at Templaqte but it only appear one Adsense link in the expanded post after clicking the READ MORE. How to add 3 Adsense links in expanded post(page)? exaple, one Ad above the Post Title and two below the post. Thanks.

vin said...

My Fun Galaxy,

In case you hadn't noticed the above post is about putting Adsense in the header!!

To put Adsense in the body of the post have a look at :

Adsense In Blog Posts

Anonymous said...

Hi Vin, I followed your instruction and able to get the 2nd "Add A Page Element" above the blog title. But when i pasted my google adsense code to the javascript & saved it, the result shows is a blank white long block. Tested at 2 blogs and came out same results. What should I do? Thanks.

vin said...


Can you share your blog address so we can check it out?

Anonymous said...

Hi Vin, I got it, the link doesn't appear immediately, it took few minutes to appear after the setting. Thanks.

vin said...

To Everyone,........

who had difficulty in putting the Adsense link unit above or below the header just put maxwidgets=4 in the header code in the template and save.

This enables you to drag the extra page element to below or above your blog title.

Winn said...

Hello Vin,

Why only one ad showing in my blog? I don't know how to fix it, please help!

Vin said...

Blimey Blog,

Optimize blog for the search engines so that they deliver more advertisements. See :

SEO Tips for Blogs

Jinxy and Me said...

Thanks so much for this post!!! I have been trying to figure out how to do this and this worked perfectly. I will definitely be coming back to your blog for more advice!

Unknown said...

It was just great hack, I was looking for it. Now i have put it in my blog and its looking great.

Thanks for posting

Unknown said...

hi Vin, how should blog´s html look after following your instructions? thx a lot for the help Vin, cheers

Vin said...


What do you mean by blog's html - page source or template?

Why do you want to know this?

Bhanu Prasad said...

HI, thanks for this.. but i can just see the column over there but i can not find the link out for there.. to add the script..

Help me out thanks..

Vin said...

Bhanu Prasad,

First you have to change the code in the template. Then the link will appear. See post above.

Anonymous said...

Hi , thank you , now I've ad above my header , thank you and more about these methods

beautifulcurare said...

I'm joining everyone else in giving you my thanks for this post! I just couldn't figure out how to get an ad below my blog title...thanks so much for this!

Everymatter said...

thanks for this coding help

i am trying for it since very long

Techonomindz said...

great post. Been looking all around how to put one-liner adsense links on top. Tried it and it works! Thanks.

Tony said...

Thnx for the tips..


Unknown said...

I want to know the this is Google AdSense policies violation or not.
Articles for computer science engineer


Skip to top of post.

Search Blog Before Commenting


Post a Comment

Please use the above search box to search this blog before posting your valuable comments.

Comments posted on Dummies Guide to Google Blogger (Beta) are moderated and will be approved only if they are on-topic and not abusive. Try not to include website URLs/links in your comments. You can email me : drbhatns at gmail dot com for any blogging question. Thanks,


The Blog Doctor The Blog Doctor2 Blog Doctor Home


Tips On Blogger and Latest News.

Skip to top of post.