How To : Place Adsense After The First Post

With many way monetize a blog, we need to place our ads in different positions, one place is the right after the first post on the homepage.To place a banner or an adsense ad right after the first post follow these steps.

  • Open your index.php or home.php based on your WP Theme
  • Look for these lines of code

    <?php if (have_posts())

      • Before that add these lines of code

        <?php $count = 1; ?>

    • Next find, this line

    <?php the_content() ?>

  • After that line, add these lines of code

    <?php if ($count == 1) : ?>
    Adsense/Banner Ad Code Goes Here
    <?php endif; $count++; ?>

    You can also change the count value in Step 3 and 5, to 2 if you want to have the ad after the 2nd post.

  • Liked It ?? Share It 🙂Share on FacebookShare on StumbleUponTweet about this on TwitterShare on Google+Digg thisBuffer this page
    Similar Post  Privacy Policy Wordpress Plugin For Adsense Users


    Leave a Reply

    Your email address will not be published. Required fields are marked *