Placing AdSense In Post Or In Middle Of Content

Placing AdSense ads should be done one the right way, otherwise your CTR could be very low, even below 0.50% which results in very low earnings. CTR means Click Through Rate or in other words, how many clicks you get from each 100 visitors that visit your website. CTR should be at least 1% which means, of each 100 visitors that come to your website, 1 of them will click an ad!

You can raise your CTR a lot if you put AdSense in post (or in middle of content, depending if you are owning a blog or website).

There are different ways to add AdSense code (or any other ad code, click here to see AdSense alternatives) but every method does the job.

1. You can add AdSense (or any other ad) in post or in middle of content by changing HTML code of your post.

You can use one of following codes:

Left aligned ad without wraping:

 

<div style="clear:both;"></div>
Replace this line with Adsense code here
<div style="clear:both;"></div>

Centered ad without wraping:

 

<div style="clear:both;"></div>
<center>
Replace this line with Adsense code here
</center>
<div style="clear:both;"></div>

 

Wrap ad to the right side:

 

<div style="width:336px;height:280px;float:right;padding: 9px 0 9px 9px;">
Replace this line with Adsense code here
</div>

 

Wrap ad to the left side:

 

<div style="width:336px;height:280px;float:left; 9px 9px 9px 0;">
Replace this line with Adsense code here
</div>

 

Now just paste your code in HTML code of your post, like on picture below:

…and you should get something like this:

2. Placing one ad in middle and one in the bottom editing single.php file

You can place one ad in middle of content and one at the very bottom. That’s very useful for super long posts. Replace everything in single.php (usually located in wordpresswp-contentthemesyourthemename) with following code:

<?php
  $content = apply_filters('the_content', $post->post_content);  //get the post content store in $content
  $save = explode("</p>", $content);  //Separate the content into <p> blocks
  $tcount=0; //this is count for number of <p> blocks
  $adon=0;  //this is a variable so you don't show ads more than once.
  foreach($save as $item) {
    echo $item;  //print the <p> block
    echo "</p>";
    if(preg_match('/<p> /',$item)==0 && $tcount>=1 && $adon==0) {
                                $adon=1;
?>
HERE GOES YOUR ADSENSE CODE
<?php
    }
 if(preg_match('/<p> /',$item)==0 && $tcount>=4 && $adon==1) {
                                $adon=2;
?>
HERE GOES YOUR ADSENSE CODE
<?php
   }
   $tcount++;
 }
?>

But be careful and backup your single.php file just in case that you want to restore your original single.php file.

3. You can use plugin

You can use plugins to easily manage ad codes and ad placements. Some of them are:

WP-Insert

Quick-adsense

Just upload those plugins, activate and follow further instructions.

Heatmap

Inserting AdSense ad in middle of content is making your CTR higher and more visitors should click on your ads. You can also use this heatmap I just made:

As you can see best position is very top left and in middle of content. First what user see is usually very left part of header. While reading content, visitor is looking for informations and that’s why ad in middle of post can raise CTR since visitor pay fully attention to it. Anyways, you should test and try different type of ads and placings because for different types of people and websites works different ad sizes and placements.

Tips and Warnings

Be careful how and where you place AdSense ads. They shouldn’t be placed next to images and they shouldn’t be 100% blended in content. Of course you can blend them in content, use same color as your wordpress theme, but don’t make ads absolutely unrecognizable from other content. Don’t break Google AdSense ToS and be sure that you are following every rule.

Leave a Reply