>>> How to Download Paid Android Apps for Free   >>> Aakash Tablet Good for Blogger to Blog on The Move   >>> Use Automatic Fixed Read More Jump Break With Thumbnail On Blogger   >>> How To Create A Privacy Policy Page To Comply With AdSense TOS   >>> Solution for Common Problems of "Drop Down Menu" for Blogger Blogspot Blog   >>> Best Tutorial to Make CSS Drop Down Menu for Blogger Blogspot Blog   >>> Add Custom Search Box In Blogger Blogspot   >>> Create a Facebook Fan Page for your Blog   >>> Add a Contact Me Page (Form) To Your Blogger/BlogSpot Blog   >>> Add Cool Subscription Widget to Blogger Blogs   >>> How to Setup Your own Domain to Blogger Blogspot Blog   >>> Add background music to your blog   >>> How to Buy Custom Domain For Your Blogspot Blog Via Blogger   >>> Blog's Definition & History In Short Note   >>> How To Remove Low paying Adsense Ads   >>> How To Host Javascript Or .Js Files On Blogger Itself   >>> Adding Numbered Page Navigation Bar For Blogger Blogspot Blog   >>> How To Change Blogger Mouse Cursors In Easy Way   >>> New Blogger App for mobile phones like iPhone, iPad, iPod Touch   >>> How to Delete or Remove Posts From Blogger Blogspot Blog   >>> How to Remove or Change the Blog Title Border in Blogger (Blogspot) - Minima Template   >>> Add or Change Background Image of a Blogger Template   >>> Add a Post Divider Between Blogger Posts   >>> How to Align and Justify Blogger Posts   >>> Guide to Blogger Blogspot FAQs   >>> How To Delete a Blogger Blogspot Blog   >>> Solution to Missing Add a Gadget Feature in Blogger   >>> Free Essential Tools for a Blogspot Blogger   >>> Add 3 Column or 4 Column Footer to Blogger   >>> Add Email This Post Link to Blogger   >>> How to Change Bullet Point Style in Blogger (Blogspot) Lists   >>> Show Date Above Blogger Post Title   >>> Blogger Post Image Borders Change or Remove   >>> Remove Image Border in Default Blogger Templates Simple and Awesome Inc   >>> How to Add a Table to Blogger Blogspot Post   >>> Choose Your Own Blogger Post Date   >>> How to Add a Subtitle to Blogger Posts   >>> Add Profile Images to Blogger Comments   >>> How to Highlight Author Comments in Blogger Posts   >>> Get More Comments on Your Blogger Blog   >>> Blogger Read More Links in Posts with Jump Breaks Feature   >>> How to Add Internal Links Within Blogger Posts   >>> Add Simple Image Slider to Blogger   >>> Add Printer Button or Link to Blogger Blogspot   >>> Add Outbrain Ratings Widget to Blogger   >>> Hide Remove Navbar from a Blogger Blog   >>> Add a Horizontal Links Menu to Blogger   >>> Add a Welcome Message to Blogger Blog   >>> Avoid 6 Common Blogger Mistakes   >>> Add Twitter Badge Button to Blogger   >>> Add a Twitter Followers Counter to Blogger   >>> Tips to Add a Digg Button to Blogger Blogspot   >>> Free Social Bookmark Buttons for Blogger   >>> Add Social Bookmark Buttons to Blogger   >>> Add a Social Bookmarking Button to Blogger   >>> Add Email Subscription Form and Links to Blogger Blogspot   >>> Add a Recent Comments Feed to Blogger Sidebar   >>> Add a Recent Posts Feed to a Blogger Blog   >>> Add a Categories Section to a Blogger Blog (Blogspot Blog)   >>> Add Affiliate Banner Below Post in Blogger   >>> Add an Affiliate Banner to a Blogger Header   >>> Add an Affiliate Banner to Blogger Sidebar   >>> Place Google Adsense Below Post Title in Blogger   >>> Add Google Adsense Below Blogger Post   >>> Add Feedjit Live Traffic Feed to Blogger   >>> Add Google Analytics to a Blogger Blog   >>> Track Visitors to Your Blogger Blog   >>> Submit Blogger Blog to Blog Directories   >>> Submit Your Blogspot Blog Sitemap to Google   >>> Submit Your Blogspot Sitemap to Yahoo   >>> Add a Blogger Sitemap to MSN Bing Webmaster Tools   >>> Submit a Blogger Sitemap to Major Search Engines   >>> Blogger RSS Feeds and Feedburner   >>> Burn Blogger RSS Feeds at Feedburner   >>> Add a Feedburner FeedFlare to Blogger Feed   >>> How to Create Search Engine Friendly Permalinks for Blogger Posts   >>> Adjust Blogger Title Tags to Improve SEO   >>> Add Amazon Product Links to Blogger Posts   >>> Make Money Add an Amazon Widget to Blogger   >>> Add Chitika Ads to Blogger Blogspot   >>> Earn Money with Chitika and Blogger   >>> 5 Easy Ways to Make Money from Blogger   >>> Make Money Add Banners Ads to Blogger   >>> Blogger Guide to Google Adsense Placement   >>> Add Banner Adsense Above Blogger Header   >>> Bloggers Guide to Google Adsense Myths   >>> Add Google Adsense to Blogger Header   >>> Better Placement of Google Adsense in Blogger   >>> Google Adsense Tips for a Blogger Blog   >>> Add Paypal Donate Button to Blogger   >>> Increase Google Page Rank Blogger Blogspot   >>> Make Money With Adsense Keywords and Blogger   >>> Add Meta Tags to Blogger for Better SEO   >>> Add Breadcrumb Navigation to Blogger Blogspot   >>> Blogger Blogspot SEO Tips and Tricks   >>> 10 Tips to Build Blogger Blogspot Site Traffic   >>> Embed a Comment Form in Your Blogger Posts   >>> List of How Blog Works Blogger Tutorials   >>> Add Missing Embedded Comments Form to Blogger   >>> How to Add Missing Quick Edit Wrench to Blogger      + Grab this Widget on howblogworks

Thursday, August 25, 2011


Add Banner Adsense Above Blogger Header

One of my readers asked me how to add a Google Adsense ad unit above the header of a Blogger Blogspot blog. Rather than post a long reply I decided to write an article about it so that others looking for help to place an affiliate banner or Google Adsense banner at the top of their blog will find the solution more easily.

To set up Blogger so that ad units can be placed above the header requires the addition of a snippet of code to your Blogger Template. I have aimed this tutorial at beginners and newbies to Blogger. The tweak can be performed in less than 5 minutes.



How to Add a Google Adsense Ad Unit or an Affiliate Banner Above the Blogger Header

1. Login to Blogger if not already logged in

2. Navigate to Layout > Edit HTML

3. As a precaution back up your template by downloading the full template to your computer

4. Tick the Expand Widget Templates box

5. Using CTRL + F to bring up the search box find this line which in most templates will be directly after <body> tag


<div id='outer-wrapper'>


6. Paste this block of code after this line to create a new section


<div id='topads-wrapper'>
<b:section class='topads' id='topads' preferred='yes'/>
</div>


7. Next we need to add some CSS styling to the new section. Please note that the banner will be centered by default. If you want to change the alignment for some reason you just need to change the CSS styling.

Place the following code in the head section of your template before these lines:

]]></b:skin>
</head>




/* Top Ads
----------------------------------------------- */
#topads-wrapper {
margin: 0;
padding: 0;
position: relative;
text-align: center;
width: 100%;
}

#topads {margin: 0; padding: 0;}

#topads .widget {margin: 0; padding: 5px 0;}


8. Click the Save Template button

9. Go to Layout > Page Elements

10. You will now see that you can add a gadget to a new section above your header and directly below the navbar.

11. To Add a Google Adsense Ad Unit
Click on Add a Gadget and choose your desired Google Adsense ad unit. If you are uncertain how to add a Google Adsense ad unit to Blogger read my article Google Adsense Tips for Blogger Blogs

To Add an Affiliate Banner
Or if you want to add an affiliate banner then you would click on Add a Gadget and choose a HTML/Javascript widget from the list of gadgets available in the menu. You would then paste the affiliate banner code into the content box in the popup window and save your changes. Click on View Blog and you will see your new banner displayed above your blog's header. For more detailed instructions about adding affiliate banners to a Blogger Blogspot blog please refer to my article Add an Affiliate Banner to the Blogger Sidebar


Tips and Troubleshooting
  • If you wish to add more than one widget to the section you will need to change the template code:

    from

    <b:section class='topads' id='topads' preferred='yes'/>


    to:

    <b:section class='topads' id='topads' maxwidgets='3'>


    This change to the template will allow you to add up to 3 widgets above the Blogger header.
  • If you wish to display your Google Adsense ad unit only on the post page and not the home page then you need to add an if statement. For instance go to Layout > Edit HTML after you have created your ad unit and you will see that the code you inserted is now different. That is because the Adsense widget code has been added. You are likely to have something that looks like this:


    <b:section class='topads' id='topads' preferred='yes'/>
    <b:widget id='AdSense7' locked='false' title='' type='AdSense'>
    <b:includable id='main'>
    <div class='widget-content'>
    <data:adCode/>
    </div>
    </b:includable>
    </b:widget>
    </b:section>


    By inserting the code within an if statement we can control where it appears. To have the Google Adsense ad unit only display on the post page add these lines of code:


    <b:section class='topads' id='topads' preferred='yes'/>
    <b:widget id='AdSense7' locked='false' title='' type='AdSense'>
    <b:includable id='main'>
    <div class='widget-content'>
    <b:if cond='data:blog.pageType == "item"'>
    <data:adCode/>
    </b:if>
    </div>
    </b:includable>
    </b:widget>
    </b:section>


In today's tutorial you have learned how to create a new section above the Blogger Blogspot header and how to add a Google Adsense ad unit to that spot or an affiliate banner. You have also learned how to place that Google Adsense unit or banner only on the post page rather than on every page on your blog. Any questions please ask.


Related Articles
List of How Blog Works Tutorials for Blogger Blogs
Blogspot Blogger Guide to Google Adsense Placement
Google Adsense Tips for Blogger Blog
Add an Affiliate Banner to the Blogger Sidebar

No comments:

Post a Comment