Google Pack Free AntiVirus!
 

WordPress Google Adsense Plugin

Filed in: Adsense Tips, Make Money Online, WordPress, WordPress Plugins — July 6th, 2005

Philhord.com has a nice WordPress plugin that insert Google Adsense code into the body of the post(inline). But, the plugin’s adsense quicktag button does not work for WP 1.5.

I took a few minutes to update the quicktag button code and now it works for WP 1.5+!

Google Adsense in WordPress post body

Download: adsense.zip

Installation:

  1. After download the plugin, extract it.
  2. Open the adsense.php file to insert your Google Adsense code.
  3. Goto line #29, insert your Google Adsense code in between :
    <!– Begin Google Adsense code –>
    and
    <!– End Google Adsense code –>
  4. Save modified adsense.php file, upload to your WP plugin directory(wp-content/plugins) and activate it in WP Admin panel’s Plugin page.
  5. Now, you get a “adsense code” button at Quicktags toolbar. Just click the button whereever you want to insert Google Adsense code in your post. Done!

Thought:
Compare to the Intouch with Subject plugin, this is only a simple update. But, I think many Google Adsense WordPress publisher will found it useful. :)
I hope we will have a Google Adsense plugin that support different code blocks(different layouts), not limited to single adsense code. Anyone?

Read also:

42 Responses to “WordPress Google Adsense Plugin”

Comments Feed | TrackBack URL
  1. #1
    SapiensBryan Says:

    Great one, liew.

    Have been looking for this long time ago !!

    For sure it’s very helpful. :)

  2. #2
    LcF Says:

    Give me 10% of profit you earned from the inline adsense block :P

  3. #3
    SapiensBryan Says:

    My 10% will only be your 0.1%, dude.

    It doesn’t even exist in your eyes, I’m sure. LoL

  4. #4
    LcF Says:

    “sikit sikit lama lama jadi bukit”
    You are doing better than I were. I am sure the 10% will be alot soon. :)

  5. #5
    SapiensBryan Says:

    Thanks for your motivation.

    Hopefully, everything turns out as you said lah. :)

  6. #6
    HART Says:

    This is cool. But I have a question, hope you can answer it for me…..

    I just switched from blogspot to wordpress and used to have my adsense in every post. Well, it took me all this week to import it (finally) and now I was hoping for an easy way to go back and add adsense to all of these posts, because it didn’t get carried forward, because it was in the blogger.com template.

    So - is there a way to embed this adsense code into every post besided editing each individual entry and clicking the quicktag button each time?

    thanks in advance if you can help me. // HART

  7. #7
    LcF Says:

    HART: you can add the google adsense code into WordPress template. With WP template, you can have adsense at almost any where you want.

    But, not in the body of the post(since it is not part of WP template). Therefore, we have this google adsense plugin. :)

    Read more about WordPress Template.

  8. #8
    HART Says:

    Hi. Thanks for reply LcF.

    I understand and its nice to have adsense anywhere inside your post, with this plug-in … but, is it possible to add the code inside a WP template? I don’t need it in each post .. I would want it just after the end of the post, before comments. I can’t figure out from the files where this point in the template really is… Am i wasting your time and my time? I hope not :-D ..

    I suppose I can re-edit all 200 archive posts, again, since I just finished editing them all to give them a category classification. I can click the adsense plugin button, but will my team contributors do the same? That’s why I would prefer a permanent fix.
    HART

  9. #9
    LcF Says:

    HART: What I was talking about is editing WP template to add adsense code! You do not need to edit every post!

    Look into your WP template directory, you need to edit index.php, single.php, sidebar.php search.php and archive.php.

  10. #10
    HART Says:

    Thanks … it worked so ‘fast’ I almost forgot to thank you! I have been constantly updating my sidebar.php but not the single.php and index.php. I have adjusted them both to work now. I never looked at the search.php and archive.php yet.. in time I will personalize these too. Maybe I can use the instant adsense button in the quicktag and plug-in for another purpose … e.g. .. maybe I will replace the google adsense coding for my standard ‘email’ signature ending? Hmm..

    Have a good one!

  11. #11
    John Says:

    Wow! Thanks for the Great Tips since i’m just upload the WP today and i’m wonder how to “plug” it, this really save my day!

    Below is some question about WP template:
    1) how can change the default template format? how many file need for editing? e.g change right-sidebar to left, add an ad link sidebar(besides the default sidebar), your Pay-pal table at top of your blog, cool button at the title etc…

    2) what is the tips and tricks as you may purpose to a WP begineer?

    Thanks for your valuable effort!

    John

  12. #12
    LcF Says:

    John: you probably need to create a new template or look for similar WP template. For WP beginner, I always recommend them to visit http://codex.wordpress.org

  13. #13
    David Says:

    Hi..

    this is great..!

    and.. how do we add 2 or 3 adsense adds to our posts.. adds with different sizes/looks.. i.e.: leaderboard and a search box.?

    thanks

    david

  14. #14
    LcF Says:

    David, I am looking for plugin that can add different adsense layout too.

  15. #15
    TheSMSGuide Blog » Blog Archive » WordPress Google Adsense Plugin for 1.5+ Says:

    [...] Liewcf.com talks about adding a WordPress Google Adsense Plugin for 1.5+ [...]

  16. #16
    lilian Says:

    Liew!
    I followed the above tutorial I got it! Thanks!

  17. #17
    Michele Neylon :: Pensieri » Article » Adsense for Wordpress - my version! Says:

    [...] The original adsense plugin for wordpress isn’t fully compatible with wordpress 1.5, but Liew released a compatible version. [...]

  18. #18
    wkw Says:

    I’ve had just the kind of adsense wordpress plugin (AdSense-Deluxe WordPress Plug-in) you wished for in use for several months now. I got distracted from releasing it trying to add ever more features, but I guess it’s time to just get it out and in use then evolve it further based on feedback.

    I still have some packaging left to do, and need to turn off the debugging code. So check back to the page above in a day or so, but you can begin reading about it now and view some screen shots of the Options page (it has a big configurator page).

    As a bonus, it also integrates an Adsense Preview tool which lets you view the ads Google will place on a given web site (the ads are sandboxed and do not credit anyone if clicked).

  19. #19
    sam Says:

    Excellent work!

  20. #20
    Tech Gadgets Blog - LiewCF.com Says:

    Adsense-Deluxe - the advance google adsense wordpress plugin

    If you are using Google Adsense Wordpress plugin then I am sure you will like to switch to Adsense-Deluxe. In the post, I said I want a adsense plugin that allow me to insert different ads blocks. wkw said he will release it one month ago. Now, the wa…

  21. #21
    I Migliori Plugin WordPress Per Google Adsense Says:

    [...] 1) WordPress Google Adsense Plugin http://www.liewcf.com/blog/archives/2005/07/wordpress-google-adsense-plugin/ [...]

  22. #22
    suzanne Says:

    Thank you very much! It worked perfectly!

  23. #23
    StevenP Says:

    Thanks, thats just amazing

  24. #24
    Jeff Johnson Search Engine Marketing - Re:Adsense in blogger POSTS - Search Engine Marketing Says:

    [...] Re:Adsense in blogger POSTS - 2005/10/08 05:51 I’ve seen several plugins for inserting adsense in your wordpress posts.One of them is located at http://www.liewcf.com/blog/archives/2005/07/wordpress-google-adsense-plugin/I‘ve also seen other solutions posted in the wordpress forum… just browse through it.However, I don’t use any of them. I simply limit the number of posts that appear on the front page to 3 or 5. To do this go to the “options/reading” section of your wordpress dashboard and adjust the number withing the “”blog pages” field.Then I add the adsense code directy to the individual templates such as index.php, sidebar.php, post.php, archive.php, etc.The key is to insert the code in the files that are shown on just about every pagee… which includes the sidebar, the footer the header, etc.I insert banner ads in the header and rotate them with a banner rotation script.You also need to make sure that you submit an “alternate url” for ads when you are getting the code for your adsense; this is a way to make sure psa ads don’t show up on your pages.This way the ads can be placed “around” all posts in strategic places and you can easily make adjustments to maximize your ctr. [...]

  25. #25
    Mark Says:

    Liew, thanks for the plugin. I’m new to wordpress so the simplicity of the plugin (and instructions) was perfect.

    Cheers

    Mark

  26. #26
    williamfong Says:

    hi!
    i am trying to get adsense up and running on my blog (im using WP 1.5.2), and i can’t seem to get it into my sidebar.

    if you visit my site, u’ll see an unusual gap in my sidebar where i tried to insert the quicktag (after following the installation instructions). it just doesn’t turn up.

    i put that quicktag in a normal blogpost (for experiment’s sake) and it works!

    how come it doesn’t work for sidebars?

  27. #27
    LcF Says:

    william: I don’t see adsense code in your blog

  28. #28
    williamfong Says:

    i put an quicktag. if you view the source codes of my blog, its there a few times. but no ads appear.

    if i paste the adsense code directly as given by Google, WP says:

    Not Acceptable
    An appropriate representation of the requested resource /blog/wp-admin/theme-editor.php could not be found on this server.

    im guessing its a problem with the adsense coding format.

  29. #29
    LcF Says:

    try to add the adsense code manually by editing the wordpress template sidebar.php file. pasting adsense code to wordpress web based theme editor is not recommneded.

    the quicktag does Not work in sidebar. The quicktag works in wordpress content only.

  30. #30
    williamfong Says:

    wow that worked! great! thanks man!

    so now i dun really need the adsense plugin… well, unless i want quick adverts. hehe… thanks a bunch man.

  31. #31
    Tony Says:

    Anyluck with the 2.0 WP?

  32. #32
    Damen Choy Says:

    What is the different in putting the adsense code on the sidebar and on the blog content?

    I know there is a limitation of putting adsense code on a single wedpage. If I put the adsense code on every post, would I violate the rule if there are more several blog postings on a single webpage?

    Anyone have inputs?

    Rgds

    Damen

  33. #33
    LcF Says:

    @Damen Choy: ads in sidebar appear all the time. ads in content only shown if the post is selected.

    You should apply some conditions in pages with multiple posts, so that the ads do no exceed the allowed number.

  34. #34
    Damen Choy Says:

    Thanks for your reply. In that sense, that means I have to limit the maximum posts per page to three if I have to allow multiple posts on a single page.

    It that correct?

    Damen

  35. #35
    LcF Says:

    @Damen: not really, I suggest limit the number of ads for multiple posts page.

  36. #36
    hariz Says:

    i’m using blogger and i want to add adsense into some of my post. not all but some. do u mind telling me how to do it.

  37. #37
    oneandhalf Says:

    guys, why not try the adsense deluxe version, it automatically bring you different layout.

  38. #38
    LcF Says:

    @oneandhalf: Yes, I previously reviewed AdSense Deluxe.

  39. #39
    Simone Says:

    Hello there!

    I have a wordpress blog, freely hosted at http://www.wordpress.com; is there a way for me to add adsense code there? If so, how?

    Thanks a lot

  40. #40
    馬修的研究室部落格(blog.mashow.tw) » Blog Archive » plugin: Adsense inline (在WordPress文章中插入Google Adsense) Says:

    [...] 補充:另外有一個網友修改了這個plugin,讓wordpress1.5+之後的版本可以在發表文章時出現新按鈕,可以馬修試了之後也還是不行,有試出來的朋友再跟馬修說一下吧!! [...]

  41. #41
    Marketing Place | Guadagnare Soldi Su Internet Says:

    [...] http://www.liewcf.com/blog/archives/2005/07/wordpress-google-adsense-plugin/ [...]

  42. #42
    mike Says:

    Thanks i will try on my blog.

Leave a Reply

Subscribe without commenting