What is Additional?
1. Reduced the need for <br /> (line break) tags in his code and using CSS style “clear:both” for the same purpose.
2. Modded this code for center alignment by using HTML5 properties.
3. Add XML code that will load only on the Blogger item page rather than loading on other pages to save your blog performance.
How to Paste Ad Code on Blogger?
Now, I will discuss how to install/ integrate/ inject this script into your blogger theme. (!) Must take a backup of Blogger theme before making any change.
1. Find the <head> tag in your blogger template and place the latest jquery just below it. Please avoid using two jquery links. Remove the older one and use the new version.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js" ></script>
2. Second look for this code <data:post.body/> inside Blogger theme and replace it with the following code –
<div id="PostBody"> <data:post.body/> </div> <div id="AdCode"> <div style='margin:5px 0;text-align:center;clear:both;'> <!-- Ad Unit Code Here --> </div> </div>
New Blogger template may have 2 or 3 <data:post.body/> code. You should have to identify correct one. Generally 2nd instance of <data:post.body/> is right code to replace in new blogger templates.
3. Now search for </body> tag inside Blogger theme and put the following javascript before/ just above it.
Post a Comment