How to show adsense in wordpress.

We can earn money from variuos ways,google adsense is one of them most bloger can place add on blogspot and it is very easy but it is not so easy to place adsense on wordpress so my today’s tutorial how to add adsense on wordpress we can  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) : ?>
    //The code from adsense is now place 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. dpress

    untitled

    The adsense will show like that….

    Advertisements
    1. its really works…

    2. yea It works properly ,I have done practically in localhost..

    3. nice info… thanks for sharing….

    1. No trackbacks yet.

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s

    %d bloggers like this: