Skip to main content

How to Make Google Adsense Show in the Middle of Blog Post



People blog for various reasons. If one of your goal as a blogger is to make money online, then correct placement of ads is going to play a very long role for you to become successful. To get the placement that will work for you, experimenting placement of ads on all part of the blog will do: The top, the sides, below post title, below post itself and in the middle of post.

show google ads in the middle of blog post


Read Also : How to Make Google Adsense show below post title
                    How to Make Google Adsense show below post title in Mobile View

For this tutorial, I will be writing on an entirely different one, placement of Google Adsense Ads in the middle of blog post.

How to Make Google Adsense Show in the Middle of Blog Post

1. Log in to your blogger dashboard
2. Navigate to template and backup your blogger template
3. Edit template and search for the below codes (Mostly the second one)

<data:post.body/>
4. Parse your Google Adsense Code using Html Encoder
5. Replace the above code with the below code
<div id='jobmiddlenew'> <data:post.body/>
          </div>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<style>#addcodemiddle{display: none;}</style>
<div id='addcodemiddle'> 
---- Parsed Google Adsense code----
    </div>
 <script type='text/javascript'>
var str1=document.getElementById(&quot;jobmiddlenew&quot;).innerHTML;
var str2=str1.length;var str3=str2/2;var substr = str1.substring(str3, str2);
var n = substr.search(&quot;&lt;br&gt;&quot;);if(n&lt;0){
n = substr.indexOf(&#39;.&#39;);if(n&lt;0){n=0;}
var firsthalf = str1.substring(0, str3+n+1);var secondhalf = str1.substring(str3+n+1, str2);
}else{var firsthalf = str1.substring(0, str3+n+4);
var secondhalf = str1.substring(str3+n+4, str2);}var addcode=&quot;
<center>&quot;+document.getElementById(&quot;addcodemiddle&quot;).innerHTML+&quot;</center>
<br/>&quot;;var newbody=firsthalf+addcode+secondhalf;

var strnew=document.getElementsByClassName(&quot;post-body entry-content&quot;);
strnew[0].innerHTML=newbody;
document.getElementById(&quot;addcodemiddle&quot;).innerHTML=&quot;&quot;;
</script>  </b:if>
6. Replace the red bold text with your parsed adsense code
7. Preview and save template.

Try and see if this kind of Google Adsense Placement will work for you. Your view on this will be highly appreciated.




Comments

Popular posts from this blog

How to add Email Subscription Widget Below Post

Getting traffic to your blog or website might be one of the easiest thing for you to do but keeping them I challenge you, is one of the toughest things in blogging. There are several methods that can be used for making your readers keep on coming but for this tutorial we will focusing on one, adding email subscription below post.
Email subscription widget at the side bar also does this work but researches have shown that email subscription box below post does best. After a useful article has been read by the visitor, he/she will like to read more and thereby subscribing just immediately after the post making him/her a permanent visitor. How do I do this?
How to add Email Subscription Widget Below Post Get your desired email subscription widget code by searching online. Log in to your blogger account Navigate to Template > edit templateRemember to back up your template Search (using CTRL + F) for <data:post.body/> Place the Email Subscription code after/below the above code

No…

How to Add CSS to blogger blog

CSS is an abbreviation for Cascading Style Sheet that gives the required design, layout to a blog or website using lines of codes. In comparison to man, I will say it's like a clothing to the body or working out in the gym to give the body the desired figure. Gone are the days when plenty codes of HTML do the job but now, with just a little line of CSS code, you get your desired result. Not saying the HTML is useless, without it, no blog and no websites.They both have their roles, HTML provides the framework while the CSS gives the design and layout of the website without taking much time.


How to Add CSS to blogger blog? Since our main concern is adding the CSS code to blogger blog, I will be sharing two ways on how this can be done.

The Manual MethodThe Template Design MethodThe Manual Method
What do I mean by the Manual Method? Here, the template of the blog is being tampered with. the template is edited before the lines of CSS code is being inserted. This method is not recommen…