Notification texts go here Contact Us Buy Now!

How to add Google Adsense in the middle of post content after read more in new Blogger themes 2017?

 Have you checked out the new Official Blogger themes from Google How to add Google Adsense in the middle of post content after read more in new Blogger themes 2017?
Have you checked out the new Official Blogger themes from Google? If you have not, then I recommend you to check out the previous post - Check out new responsive Blogger themes released by Google! And, if you have, then I am wondering if you are thinking how and where to place Google Adsense in the new official Blogger themes. You can also check out different regions where you can place and display Google Adsense ads on new Blogger Themes here.

Besides automatically displaying Google Adsense ads from Blogger or manually adding Google Adsense ads via HTML/JavaScript widgets / gadgets, if you intend to place Google Adsense ads in the middle of post content, then you can do so in the following steps.


Show Google Adsense Ads right after read more in new Blogger theme

  • Login to Blogger
  • Click Theme > Edit HTML
  • Click anywhere in the page displaying the Blogger template code
  • Then press CTRL + F and search for "  <head>" (without "")
  • Paste the following code right after <head>
<!--for adsense middle ads-->
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js' type='text/javascript'/>
<script type='text/javascript'>
$(document).ready(function(){

$(&#39;a[name=&quot;more&quot;]&#39;).before($(&#39;#jkp-google-ad&#39;).html());
$(&#39;#jkp-google-ad&#39;).html(&#39;&#39;);

});
</script>
<!--for adsense middle ads-->

  • In the same way, do CTRL + F and search for "<data:post.body/>" (without "")
  • Right after "<data:post.body/>", paste the code from Google Adsense. Example Below.
<!--adsense middle mobile and desktop start-->
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<!-- comment this to post ad after DIV and bottom of the content  <div style='display:none;'> -->
 <div id='jkp-google-ad'>
<br/>
<center>

&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-XXXXXXXXXXXX&quot;
     data-ad-slot=&quot;XXXXXXXXXXXX&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
</center>
<br/>
<!-- </div> -->

</div>  </b:if>
<!--adsense middle mobile and desktop end-->

 Where XXXXXXXXXXXX is your Google Adsense published ID and ad slot respectively.


NOTE: 
If you place Google Adsense code as it is from Google Adsense page, you might get error related to "async". In that case, replace the above code with your Google Adsense publisher ID and slot ID
  • Save the theme.
  • Now you should be able to see Google Adsense ads displayed right after the "Read more" break and also at the end of the post content.

If you want to show only one ad after the read more break and not at the bottom of the page, then remove the comment from the third line of the above code (highlighted red above). So it now looks like -

<!--adsense middle mobile and desktop start-->
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div style='display:none;'>
 <div id='jkp-google-ad'>
<br/>
<center>

&lt;script async src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;!-- 300x250 --&gt;
&lt;ins class=&quot;adsbygoogle&quot;
     style=&quot;display:inline-block;width:300px;height:250px&quot;
     data-ad-client=&quot;ca-pub-XXXXXXXXXXXX&quot;
     data-ad-slot=&quot;XXXXXXXXXXXX&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
</center>
<br/>
<!-- </div> -->

</div>  </b:if>
<!--adsense middle mobile and desktop end-->

 Where XXXXXXXXXXXX is your Google Adsense published ID and ad slot respectively.


After saving the theme, you should be able to see one Google Adsense ad after the read more break and the ad at the bottom is not displayed.

Hope this is helpful to someone. Cheers!

إرسال تعليق

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.