Google Adsense Ads Between WordPress Posts

Friday, 22 June 2012
WordPress is one of the most used platform of blogging. Normally people earn money by placing Google Ads in sidebars only BUT you can increase Google Adsense Earnings by placing Google Ads between WordPress posts at mainpage. There are several plugins to show Google Adsense ads between WordPress posts. But here is a manuall method to show Google Ads inside WordPress posts.
.

All You have to edit your WordPress Theme’s index.php file


1- Login to WordPress Admin Panel and navigate to Appearance > Theme Editor

2- Now, Find and click on index.php (Main Index Template ) template from right listed files list.

3- Find This Code



<?php if (have_posts()) : ?>



 4- Above given code with following code



<?php if (have_posts()) : ?>

<?php $count = 1; ?>



5- Now find following code



<div class=”entry”>

or

<div class=”postcontent”>



6- Add following code after above searched code.



<?php if ($count == 1) : ?>

AdSense Code

<?php endif; $count++; ?>


 
By defafult the add will be displayed after 1st post, BUT If you want the add under desired number of post, simple change $count == 2 the figure.