BlogKnowHow apologies for the technical problems with the site. We are working on it and hope to resolve the issue as soon as possible.

Wednesday, June 17, 2009

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 Google Adsense or an Affiliate Banner Above Blogger Blogspot Header
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 Blog Know How 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

Tuesday, June 16, 2009

Add Email Subscription Form and Links to Blogger Blogspot

Email Subscription Form as seen in a Blogger Blogspot blogIn this tutorial you will learn how to add an email subscription form to your Blogger Blogspot blog so that your visitors will have easy access to your latest updates via email. Adding an email subscription form to your blog is very easy to do and is one way to stimulate repeat visits to your blog.

Below is a step by step walkthrough of how to add an email subscription form to a Blogger blog. I have broken down the steps so that even beginners and newbies can easily follow the steps.

Why Offer the Option to Receive Updates Via Email?
If you are keen to have your visitors return to your blog then as a webmaster you can facilitate this by giving them options about how they would like to receive your updates. Receiving updates by email is just one of several options that you can offer your visitors to turn them from a one time visitor into a regular follower. Other common choices are to follow you in a reader such as Google Reader or alternatively follow you on Twitter. I have recently set up my feed to feed directly into Twitter using the Twitterfeed service so that my readers can follow me on Twitter.

How to Set Up an Email Subscription Form at Feedburner
In order to set up an email subscription link or form at Feedburner you first need to have your feed burned by Feedburner. If you are not sure how to do this please read my step by step article on burning a Blogger RSS Feed at Feedburner or follow these brief instructions

1. If you are using your Google Account click on the My Account link and choose Feedburner from the list. Alternatively go to Feedburner and sign in. If you aren't registered you can quickly create a free account using your Google Account.

2. After logging in you will be taken to the My Feeds Page. If you already have your feed burned skip to Step 3 otherwise follow these instructions to burn your feed.

If you need to burn your feed first enter the URL of your Blogger blog into the Burn a Feed Right This Instant box and click Next.

Burn a Feed Right This Instant with Feedburner
You will need to enter the title of your new feed. I suggest you use your blog title as your title. You will also be asked to choose a feed so choose the RSS Feed. You will then be taken to a success page and a message something like Congrats! Your FeedBurner feed is now live. After clicking Next you will now be prompted to customize your options. Read how to do this in my article about burning a Blogger RSS Feed at Feedburner. Once you have finished customizing your options click Next to proceed to the My Feeds Page.

3. Once you have your feed click on the link to it from the My Feeds Page. This will direct you to the Feedburner dashboard.

4. Now select the Publicize tab.

5. From the left sidebar click Email Subscriptions

6. Scroll down to the bottom of the page and click on the Activate button. If you are not sure what email address you are using for your account you can check this first.

7. You will now be taken to the Subscription Management Page.


8. Choose your language. The default is English

9. From the dropdown menu Use a Widget in select Blogger. The default is Typepad. The orange Blogger favicon will now show up.

10. To Automatically Insert the Subscribe By Email Widget into Blogger

  1. Click on the GO button next to the Blogger Widget.
  2. You will be taken to the Blogger Add Page Element Page where you can select your blog from a dropdown menu if you have more than one blog.

    Blogger Add Page Element Page to insert email subscription widget into your blog
  3. Click on the Add Widget button and your subscribe by email widget will be added to your blog.
  4. You will now be taken to the Layout > Page Elements page
  5. Reposition your widget and save any changes. By default the widget is added to the top of your Blogger sidebar.

Note:If you find that the Page Elements Page does not load properly click on View Blog and you will find that the widget has been inserted. You can then go back and reposition it.


To Manually Insert the Subscribe By Email Widget into Blogger
  1. Copy the code and navigate to the Layout > Page Elements screen in Blogger.
  2. Select Add a Gadget in the area you wish the subscribe by email widget to appear (in most cases this will be the sidebar).
  3. Choose HTML/Javascript widget
  4. Paste the widget code into the content box
  5. Click on the Save Button
  6. Reposition the widget if necessary. A good place is at the top of the right sidebar and Save.
  7. Click on View Blog to see your new email form in your blog


Add an Email Subscription Link to Blogger
Note you can also add an email subscription link to your blog. Either copy and paste the link from the Feedburner Subscription Management Page into your blog or you can automatically insert it by following the same steps as with the automatic insertion of the email subscription form. You will find the code for the link in a text box below the code for the form on the Subscription Management Page. Email subscription links are useful both in the sidebar and beneath each post.

Add Feedburner Email Subscription Link to Blogger Blogspot Blog

Check Your Subscribe By Email Form is Working Correctly
Once your subscribe by email widget is safely installed your form is ready for use. I suggest you test drive it to make sure it is performing correctly. Besides if you sign up you will have at least one subscriber right? Also you may want to regularly check who is subscribing to your blog by email by navigating to the Feedburner > Publicize page for your blog.

1. On the homepage of your blog enter your email address and click on the Subscribe button.
2. You will be take to a Feedburner Email Request screen with a captcha check for spam. Enter the sequence of alphanumeric characters into the text box.

Feedburner Email Request screen with a captcha
3. Click on the Complete Subscription Request button
4. You will now be informed that your request was successful and that you will need to click on the activation code in an email that has been sent to you.
5. Open your email program and retrieve the email and follow the activation link. You will then receive an Email Subscription Confirmed notice from Feedburner. As the notice points out you will only receive an email if you make a post so you will need to get cracking on writing your next post.

Feedburner Email Subscription Confirmed notice

In this tutorial you have learned how to add an email subscription form to a Blogger Blogspot blog so that your readers can enjoy receiving your most recents posts directly to their mailbox. Allowing visitors to sign up for your feed via email will promote your blog and can easily turn a new visitor into a regular follower. An alternative to an email subscription form is to insert a subscription link into your blog. I find a good place for an email subscription link is after each post to encourage visitors to sign up for my feed.


Related Articles
List of Blog Know How Tutorials for Blogger Blogs
Burn a Blogger RSS Feed at Feedburner

Sunday, June 14, 2009

Show Date Above Blogger Post Title

Sometimes you may download a Blogger Blogspot template which does not display the date header above the post title. I recently struck a free Blogger template like this and it took some time to find the right part of the template to fix the date. Plus the answer was not as far as I could tell listed in Blogger help. So to help anyone desperately struggling to find the solution to this problem I have decided to share this information in this article.


To Display the Date Header Above Post Title

1. Log in to Blogger

2. Go to Layout > Edit HTML

3. Back up your template before attempting any changes

4. Type the following into the search box (CTRL + F) to find the block of code beginning with this line:

<data:adStart/>

5. Paste the following lines of code

<b:if cond='data:post.dateHeader'>
<h2 class='date-header'><data:post.dateHeader/></h2>
</b:if>

into the code block as shown here:

<data:adStart/>
<b:loop values='data:posts' var='post'>
<b:if cond='data:post.dateHeader'>
<h2 class='date-header'><data:post.dateHeader/></h2>
</b:if>

<b:include data='post' name='post'/>
<b:if cond='data:blog.pageType == "item"'>
<b:include data='post' name='comments'/>
</b:if>
<b:if cond='data:post.includeAd'>
<data:adEnd/>
<data:adCode/>
<data:adStart/>
</b:if>
<b:if cond='data:post.trackLatency'>
<data:post.latencyJs/>
</b:if>
</b:loop>
<data:adEnd/>
</div>

7. Click the Save Template button

8. View Blog to see the date above the header


Today's Blogger Blogspot tip has shown you how to add the date above the post title on a Blogger Blogspot blog. The date above the post is often missing among slightly older Blogger templates but thankfully the fix is fairly easy.


Related Articles
List of Blog Know How Tutorials for Blogger Blogs