Saturday, October 29, 2011

How To Put AdSense Ads Between WordPress Posts

Author: Gagan Masoun
How To Put AdSense Ads Between WordPress PostsIn my previous article you can find Powerful Google AdSense Tricks to Boost Your Ad Revenue.Today again..I am talking about Adsense ads.In this article you will learn How To Put AdSense Ads Between WordPress Posts.So, come to point & read given below steps:

How To Put AdSense Ads Between WordPress Posts:
1. First Of All Log into your WordPress admin panel

2. Select Appearance -> Theme Editor from the navigation menu

3. From the Theme Editor, find and select the "Main index template" (index.php) from the list to the right

4. Find the following line
<?php if (have_posts()) : ?>
5. Above it add the following line
<?php $count = 1; ?>
6. Now find the following line
<div class="entry">
7. Add the following code directly below it (replace AdSense Ad Code with your code)
<?php if ($count == 1) : ?>
AdSense Ad Code
<?php endif; $count++; ?>
8. Click on update file, then go to browser for view your site to confirm that the ad has been added to the first post listing.

Please Note: To change which post your ad is placed under, simply change the count number
For Example: $count == 2 will place the ad under post 2

It's done,Best of luck

0 comments:

Post a Comment