- Get link
- X
- Other Apps
- Get link
- X
- Other Apps
1. Go to blogger and sign in into account.
2. Click on 'template' from the drop down menu.
3. Click on Open the
"Edit HTML" button.
4. Click
anywhere inside the code box area
and press the CTRL + F keys (or
Command + F) on your keyboard. This will open up the editor' search box.
5. Then search for the following line by coping and pasting into the
search box :
<data:post.body/>
6. It is important to know that there will be many <data:post.body/
>, but you should stop at the second one. If you try the second one and you did not see any result, then try
the last one.
7. Add this code <div id='adsense-
target'> before it and this code after it, </div> so that it will look
like this,
<div id='adsense-
target'> <data:post.body/></div>
8. The next step is to copy the AdSense code
you want to display and then convert it into plain text.
9. Then just above the line that we just
found, add the following HTML
and replace the "ADSENSE CODE
HERE" text with the converted ad
code:
<b:if cond='data:blog.pageType
== "item"'>
<div id='adsense-content'
style="display:block;text-align:
center">ADSENSE CODE HERE</
div></b:if>
note: only replace the ADSENSE CODE HERE with your adsense code that
you have converted into plain text. If you don't know to convert
adsense code to plain text, search online for tools that could convert
it.
By default, the adsense ads will showat the middle of your post after
the first paragraph (by default).
However you can modify the adsense ads to show to the left of your
page instead of the middle.
To do this
change <div id='adsense-
content' style="display:block;text-
align: center"> with
the following
<div id='adsense-content'
style="display: inline-block;float:
left;margin:15px 15px 15px
0px">
and if you want it to show at the right hand side of your post , change <div
id='adsense-content'
style="display:block;text-align:
center"> with the following text
<div id='adsense-content'
style="display:inline-
block;float:right;margin:15px
0px 15px 15px">
note: the above practice is done above or on top of this code in step 7:
<div
id='adsense-
target'><data:post.body/></div>
10. You should now add the below script after or below the above code:
<script type='text/javascript'>
function insertAfter
(addition,target) {
var parent = target.parentNode;
if (parent.lastChild == target) {
parent.appendChild(addition);
} else {
parent.insertBefore
(addition,target.nextSibling);
}
}
var adscont =
document.getElementById
("adsense-content");
var target =
document.getElementById
("adsense-target");
var linebreak =
target.getElementsByTagName
( "br");
if (linebreak.length > 0){
insertAfter( adscont,linebreak[0]);
}
</script>
Important Note:
- To insert the ad after the
second paragraph, change "0"
from the line towards the end with "2".
- If you want to put AdSense just
below the heading h2 or
heading h3 of a post, then replace br
from "br" with h2 or
h3.
11. Then Click "Save template" to save
the changes.
2. Click on 'template' from the drop down menu.
3. Click on Open the
"Edit HTML" button.
4. Click
anywhere inside the code box area
and press the CTRL + F keys (or
Command + F) on your keyboard. This will open up the editor' search box.
5. Then search for the following line by coping and pasting into the
search box :
<data:post.body/>
6. It is important to know that there will be many <data:post.body/
>, but you should stop at the second one. If you try the second one and you did not see any result, then try
the last one.
7. Add this code <div id='adsense-
target'> before it and this code after it, </div> so that it will look
like this,
<div id='adsense-
target'> <data:post.body/></div>
8. The next step is to copy the AdSense code
you want to display and then convert it into plain text.
9. Then just above the line that we just
found, add the following HTML
and replace the "ADSENSE CODE
HERE" text with the converted ad
code:
<b:if cond='data:blog.pageType
== "item"'>
<div id='adsense-content'
style="display:block;text-align:
center">ADSENSE CODE HERE</
div></b:if>
note: only replace the ADSENSE CODE HERE with your adsense code that
you have converted into plain text. If you don't know to convert
adsense code to plain text, search online for tools that could convert
it.
By default, the adsense ads will showat the middle of your post after
the first paragraph (by default).
However you can modify the adsense ads to show to the left of your
page instead of the middle.
To do this
change <div id='adsense-
content' style="display:block;text-
align: center"> with
the following
<div id='adsense-content'
style="display: inline-block;float:
left;margin:15px 15px 15px
0px">
and if you want it to show at the right hand side of your post , change <div
id='adsense-content'
style="display:block;text-align:
center"> with the following text
<div id='adsense-content'
style="display:inline-
block;float:right;margin:15px
0px 15px 15px">
note: the above practice is done above or on top of this code in step 7:
<div
id='adsense-
target'><data:post.body/></div>
10. You should now add the below script after or below the above code:
<script type='text/javascript'>
function insertAfter
(addition,target) {
var parent = target.parentNode;
if (parent.lastChild == target) {
parent.appendChild(addition);
} else {
parent.insertBefore
(addition,target.nextSibling);
}
}
var adscont =
document.getElementById
("adsense-content");
var target =
document.getElementById
("adsense-target");
var linebreak =
target.getElementsByTagName
( "br");
if (linebreak.length > 0){
insertAfter( adscont,linebreak[0]);
}
</script>
Important Note:
- To insert the ad after the
second paragraph, change "0"
from the line towards the end with "2".
- If you want to put AdSense just
below the heading h2 or
heading h3 of a post, then replace br
from "br" with h2 or
h3.
11. Then Click "Save template" to save
the changes.
Related Posts
How to uncovered hidden files and remove shortcut virus from your drive How to unhide files and remove shortcut virus from your drive 1. Plug in the flash drive or mobile phone to your computer 2. Take note of the drives let… Read More
6 negative sides of Google adsense 6 dark sides of Google adsense Google AdSense is a great way to make money from your site but you need to comply with certain policies to be able to stay in … Read More
7 apps or sites to automatically share your blog posts to social medias List of apps or sites to automatically share your blog posts instantly to numerous social medias to drive massive traffic to your blog or website Traffic … Read More
20 Plus Sites You Can Comment To Get Backlinks To Your Blog or Website One of the ways to drive traffic to your blog is through backlinks. Organic backlinks are very hard to build and it takes a long time to materialized. There… Read More
11 Steps To Insert Adsense Inside Posts on Blogger1. Go to blogger and sign in into account. 2. Click on 'template' from the drop down menu. 3. Click on Open the "Edit HTML" button. 4. Click anywhere in… Read More
Comments
Post a Comment