• Home
  • Archives
  • Contact Us
Tech Yard

How To : Place Adsense After The First Post

ADVERTISEMENTS

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.

    1. Share and Enjoy:
      • Reddit
      • SphereIt
      • Spurl
      • Technorati
      • E-mail this story to a friend!
      • Live
      • Mixx
      • Print this article!
      • Propeller
      • Sphinn
      • TwitThis

      You can receive our articles for free on your email inbox, with more freeware, windows tools and blog tips. Just enter your email below:

      Delivered by FeedBurner

      tag Digg This! tag Stumble it! tag Add to Del.icio.us tag Netscape it! tag Google Bookmark It!
      Related Posts:
    2. How To : Place Adsense in Blogger Blogs
    3. How To : Add Adsense In Wordpress Blogs
    4. How To Get A Featured Post Section In Wordpress Without Any Plugins
    5. See Your Adsense Earnings In Graphs
    6. Link To Old Posts Easily With RB Internal Links
    7. 4 Responses to: "How To : Place Adsense After The First Post"

      1. 1 Rockstar Sid
        Friday, July 18th, 2008 at 6:54 pm

        Good one.. I am still tryin to learn all the wp loops in wordpress.. :-|

      2. 2 Nirmal
        Friday, July 18th, 2008 at 8:33 pm

        I had implemented this when I used my previous theme.

      3. 3 Venkat
        Friday, July 18th, 2008 at 10:46 pm

        @RockStar Sid : This is something I learnt recently and wanted to share with you all.

        @Nirmal: Thanks for the comment nirmal, I hope you release your old theme it was really a nice theme.

      4. 4 Siddharth
        Saturday, July 19th, 2008 at 8:57 pm

        nice trick ;)
        I now use OIO publsiher


      Trackbacks/Pingbacks
      Posting your Comment!


      Join in on the conversation below!

      You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



      Translate TechYard Into Your Language

      العربية Български 中文(简体) 中文(繁體)
      Hrvatski Česky Dansk Suomi
      Français Deutsch Ελληνική हिन्दी
      Italiano 日本語 한국어 Norsk
      Polski Português Română Русский
      Español Svenska    
      Subscribe to Tech Yard by Email
      Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Add to Technorati Favorites! Add to netvibes

      Recent Posts

      • Bechmark Your Blog Loading Time
      • Convert Your Photos Into Sketches
      • Change Default Folder Where Windows Installs Softwares
      • US Dollar Bill Aptly Suiting The Present US Economy
      • Customize Your iPod With Themes Using iPW
      • Translate WebPages From Within FireFox
      • Check Whether Your System Can Play The Game Or Not
      • Access Google Analytics On iPhone
      • Twitter Revamp In The Making
      • Create Ripple Effect Of Your Desktop Wallpaper
    8. Recent Comments

      • Avinash on Bechmark Your Blog Loading Time
      • zuborg on Bechmark Your Blog Loading Time
      • firefox tricks on Chrome Tweaks : Wordpress Theme
      • tricks on US Dollar Bill Aptly Suiting The Present US Economy
      • Tech News on Display Thumbnails For Excerpts On Homepage In Wordpress Without Using Custom Fields.
    9. TECH YARD Copyright © 2008 | Disclaimer & Privacy Policy | Slick Blue Theme by Kyle Eslick