x

Subscribe to GwArez !



Pages

Whatever you need!!! We bring it!!!

Tuesday, June 07, 2011

How to show/add ads between the Post Title and Post Body

You may have seen Google Ads showing just below every post title (but above the post body) on different blogs or websites. You can see it on this blog also. But have you ever tried to apply this on your blog. Some of you may have tried it by adding the adsense code in post, but its not possible to put adsense code every time you make a post. or still if you do this, it would be very hectic.

Here I am showing the simple trick using which, you will have to do it only once and it will automatically be showing below the Title of each and every post of your blog.Just follow the simple steps showing below:

Step 1:
First of all setup your Adsense in whatever format you wish or which suits your blog and get the code.

Step 2:
When you have have got adsense code, you will have to parse this code HERE. Parsing is nothing but the conversion of the special symbols of adsense into xml supported language. After parsing you will get the converted code. Just Copy the code and then proceed for the next step.

Step 3:
Now login to your Blogger Account and go to Layout >> Edit HTML. Here you then Click on the "Expand Widget Templates" box.
In HTML code box find (Ctrl+F) the below peice of code:
<p><data:post.body/></p>

Step 4:
When you found this code just put your parsed adsense code before the <data:post.body/> tag. You code will look like this:
<p>YOUR PARSED ADSENSE CODE HERE<data:post.body/></p>

When you have done this, dont hurry to save it. First see the preview of it and if it shows perfectly, you can save it now. But it may sometimes not show perfectly depending upon your template style or if you are using ads other than from Google Adsense. Well in this case, dont worry, You will have to change the first step. Means when you get the adsense code (Whether from Google or else) you will have to do something more before Parsing it(i.e. Step 2).

Step 1 (alternative):
After getting the adsense code, just add a peice of code just before and after your original adsense code as shown below:
<table align='left'><tbody><tr><td align='left'>
YOUR ORIGINAL ADSENSE CODE HERE
</td></tr></tbody></table>


This code is now the result of your First step instead of previous one. Now copy this whole code and then go to the Step 2 (i.e. Parsing).

No comments:

Post a Comment