AdSense Ads between post title and post body

To improving the performance of your Google AdSense ads is knowing where to place the ads. In this, we discuss the modification you can make to your Blog template to appear your Google AdSense ads appear between post title and post body, or between your post body and post footer. Also, we discss the AdSense ads appear on every individual post.

Choosing a best placement for your AdSense ads will attract more attention; attention leads to clicks; and clicks bring you AdSense revenue. Easier said. While people may have 
theories on where the ideal AdSense spot ought to be, there is really no standard answer because it depends very much on your Blog's layout, contents, theme, etc.

Many people believe that having AdSense ads between post title and post body will best optimize their performance. For the purposes of this article and to give you an idea how it would look, we have inserted the AdSense code into our template to have the AdSense ads between post title and post body. If you think you would like to do the same for your Blog, the following are the steps.

We assume you have a 
Google AdSense account. If you don't, you can create one using the same login through your Google account. You will be assigned a Publisher identity number which shall appear in all your AdSense codes.


    1. Sign in to your account at http://www.google.com/adsense.

    2. Visit the My ads tab.

    3. From the sidebar, choose the product. If you simply want to display ads on your 
        website, choose "Content ads."

    4. Click ”+New ad unit” button. 
    5. Name and customize your ad unit.
  • Name: Provide a unique name and description that will help you find this ad unit later.
  • Size: In general, wider ad units perform better. We encourage you to choose one of our recommended ad sizes, which have shown to perform well across a variety of sites.
  • Ad type: We encourage you to display both text and image ads. By displaying moread types, you can earn more revenue.
  • Ad style: Choose an ad style that complements your page. (View tips.) You can also set a different font face, font size, and corner style, or just use Google defaults.
  • Custom channels: Custom channels are an advanced feature that you can use to group specific ad units together. Learn more about custom channels.
  • Backup ads: When no targeted ads are available, we'll you can choose to display another ad or color instead.
    6. Click Save and get code.
    7. Copy and paste the ad code into the MS Word or MS Notepad.

Copy this code and paste it into Microsoft Notepad. If you can use MS Word, it’s very easy to change your code using “Find and Replace” option.

Change the AdSense code

We are not at all altering the code but converting some of the characters to character entities. We have to parse the AdSense code so that it can be included into your Blog template. This is not against AdSense rules because after the code is inserted into the template, when you view the source code of the template, you should see the exact same AdSense code that Google has generated for you. You get the source code looks like this
Indeed, if it is anything different, it means that you have not parsed it correctly and should review the code again. Parsing the code essentially involves replacing the following HTML characters:- 







Your final Google AdSense Code should look something like this:-











Insert code into template
Login to your Dashboard. Go to Template -> Edit HTML and click the box next to “Expand Widget Templates”.

Block copy the entire HTML code for your site that you presently have and save it in a separate text file in MS word or Notepad. Download full Template to backup the template using the “Backup / Restore” button. This is one of the two necessary steps whenever you want to change the template. The second step is to “Preview” the new changes, in edit HTML window you can edit and Preview your changes without saving. Also you can clear your changes. Save the changes only when you are satisfied.

Now search for post.body through your browser's search function (Ctrl+F for Firefox and IE). You should see these lines:-







If you want the AdSense ads to appear between the post title and post body, add the following code above the red lines. If you want the AdSense ads to appear immediately after every individual post, add the following code below the red lines. The code to add is:-










The AdSense Code is the one you have amended above in MS Word or Notepad. Do NOT save the template, but click the Preview button to see if you like the placement of the AdSense ads.


Adjust the AdSense ad margins

Do you want to have the AdSense code on the left of the post body or right of the post body? To float the ads to the left or right, code you can use is:-










Should you want to align the AdSense ad to your text, you can specify a margin or padding around the entire AdSense code. The code you can use is:-





The first number 5px is for the top margin, 10px is for the right margin, 15px for the bottom margin, and 20px for the left margin. You should of course change these values to suit your template.

Preview the template and if you are satisfied, save the template and refresh your Blog to see the new positions of your AdSense ads.