web statistics
Image 01 Image 02

How To : Add Adsense In WordPress Blogs

14
Share |

Adsense is the most preferred CPC advertising system, If you started out with WordPress adding adsense code into wordpress can be a bit confusing.Follow these steps to implement adsense in your wordpress blogs.

  • Obtain your Adsense code from your Adsense Account.
  • Log into your wordpress blog, 
    Click Design Tab,
    Then Click the Theme Editor,
    Click  Single Post (single.php) on the right hand side from the Theme Files
  • If you want the ad below the title of the post,
    Find  this code <div class="postContent"> and place the adsense code right above it. google adsense implementation thumb How To : Add Adsense In Wordpress Blogs
  • If you want the Adsense ad after the post you have to place the adsense code after the first </div> of the <div class="postContent">

    google adsense implementation2 thumb How To : Add Adsense In Wordpress Blogs

Wrapping Adsense Around Text

You can also wrap adsense around the text in the single-post pages.To wrap adsense around the text follow these steps

To wrap the text to right of the ad, add your adsense code in between these lines 

          <div style="display:block;float:left;margin: 0px 10px 0px 0px;">

         Your Adsense add script

</div>

  • To wrap the text to the left of the ad, add your adsense code in between these lines.

  <div style="display:block;float:right;margin: 0px 10px 0px 0px;’>

   Your Adsense add script 

   </div>


Posted on 15th July 2008 by Avinash under category Tips,Tricks and Hacks, Tutorials, WordPress


14 Responses to “How To : Add Adsense In WordPress Blogs”

  1. Use a text-widget for sidebars. If you want it to come above a single post make sure you put it about the while loop in single.php.

  2. Venkat says:

    @Prathik Rajendran: Thanks for the comments and your suggestions.

  3. Mira Yasmine says:

    This is what I am looking for…
    I’ve tried to wrap ads and find this site

    Very useful info…
    Great post :)

  4. life says:

    Excellent post – especially for us newbies

  5. Hi,

    I am trying to implement “Wrapping Adsense Around Text” section. Do I have to add the code to every single post or can I place somewhere in single.php and it will get displayed on all the posts?

  6. Shrinidhi says:

    On the same topic visit http://everythingoutthere.izfree.com/2009/02/add-adbrite-or-adsense-to-wordpress/ on how to place ads in most common places. Sidebar, single post view, header, in between two posts are explained.

  7. yarick says:

    hi there, thank for you for the suggestions. I am trying to get my wordpress 2.7.1 text to be wrapped around the adsense add. i went to single.php but i did not find <div style

    Help?

  8. Marcus says:

    For the text flow on the left, it should be:

    style=”display:block;float:right;margin: 0 0 0 10px;’>

  9. jangkrikjr says:

    Thank you fo your tips. I was looking about this :)

  10. paul says:

    Hi, im trying to figure out how to do this but cannot find how to get to the theme editor. I guess the layout has changed since this tutorial has been created. could you give me some more insight please? thanks in advance

  11. Movies All Time says:

    Great trick. Thanks However I can not find the <div style=…" code in my theme. What can I do?

  12. Brooklyn Evans says:

    you can easily earn lots of dollars from adsense if you have a high traffic site.’`”

Leave a Reply


Web Informer Button