Wednesday, September 20, 2017

Adsense - How to Put Ads Without Damaging Articles or Images Postings.

Many ways to earn money from the internet, one of which is Google Adsense. Google Adsense is one of the most popular advertising media on the internet with the owner of the service namely Google, Google's advertising media has a work system PPC (Pay Per Click) or earn income from click ads that we put on Blog or youtube channel.
 Middle ads for blog

Said quite popular because Google Adsense proven to pay publishernya in accordance with the revenue collected on the account or dashboard adsense. Although quite popular but to get an adsense account is not easy, requires a blog that has a good reputation for when the list adsense can be accepted. If the adsense registration has been received or diapproved, the next step is to install the script ads that can be from the dashboard adsense to blog for income can run.

To install adsense ads there are several ways that is, first by direct through the widget menu or directly through the edit template. If installing via widget is quite easy but has some disadvantages that ads can only be installed according to the location of widget elements in the layout. Conversely if using the second way that is by installing directly through the edit HTML ad position can be arranged anywhere, as in the article posting area.

 How to Put Ads Without Damaging Articles or Images Postings.

#Step 1
Login to your blog and Click Template>Edit Html

#Step 2
Find this Code
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div itemprop='description articleBody'><data:post.body/></div>

In some cases maybe the code that is in our blog is not the same tpi we can adjust, by looking for 
"<data: post.body />" there may be 2 or 3 code like that we do just need to adjust it. See the picture below:

Put Ads Without Damaging Articles


Put Ads Without Damaging Images

we need to add is "<div id = 'middleads'>" and "</ div>" as closing.

#Step 3
Add the code "<div id = 'middleads'>" and "</ div>" so the result is like this......   
<div id='middleads'>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div itemprop='description articleBody'><data:post.body/></div>

#Step 4

Search "</ Body>" Put the following code into your blog's html, just above the "</ body>" code.
<b:if cond='data:blog.pageType == &quot;item&quot;'>
#middle-ads{display: none;margin:0 auto;padding:0}
.middleadsproject{padding:0;width:auto;text-align:center;height:auto;margin:5px auto 0;display:block}
.middleadsproject h4{color:#bbb;text-align:center;margin:0 auto 7px;font-weight:normal!important;letter-spacing:1.5px;padding:0;font-size:90%}
<div id='middle-ads'><div class='middleadsproject'><h4>Advertiser</h4>

</div> <script type='text/javascript'>
var str1=document.getElementById(&quot;middleads&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;);
n = substr.indexOf(&#39;.&#39;);
var firsthalf = str1.substring(0, str3+n+1);
var secondhalf = str1.substring(str3+n+1, str2);
var firsthalf = str1.substring(0, str3+n+4);
var secondhalf = str1.substring(str3+n+4, str2);
var addcode=&quot;<center>&quot;+document.getElementById(&quot;middle-ads&quot;).innerHTML+&quot;</center><br/>&quot;;
var newbody=firsthalf+addcode+secondhalf;
var strnew=document.getElementsByClassName(&quot;post-body entry-content&quot;);
Replace the words "Code Parse" using your Adsense ads script.

Here for Parse code html Script.