WordPress Google Adsense Plugin

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

advertisement

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?

Bookmark and Share

Read also:

  • Great one, liew.

    Have been looking for this long time ago !!

    For sure it's very helpful. :)
  • LcF
    Give me 10% of profit you earned from the inline adsense block :P
  • My 10% will only be your 0.1%, dude.

    It doesn't even exist in your eyes, I'm sure. LoL
  • LcF
    "sikit sikit lama lama jadi bukit"
    You are doing better than I were. I am sure the 10% will be alot soon. :)
  • Thanks for your motivation.

    Hopefully, everything turns out as you said lah. :)
  • 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
  • LcF
    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.
  • 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
  • LcF
    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.
  • 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!
  • 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
  • LcF
    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
  • 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
  • LcF
    David, I am looking for plugin that can add different adsense layout too.
  • Liew!
    I followed the above tutorial I got it! Thanks!
  • wkw
    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).
  • sam
    Excellent work!
  • Thank you very much! It worked perfectly!
  • Thanks, thats just amazing
  • Liew, thanks for the plugin. I'm new to wordpress so the simplicity of the plugin (and instructions) was perfect.

    Cheers

    Mark
  • 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?
  • LcF
    william: I don't see adsense code in your blog
  • 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.
  • LcF
    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.
  • 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.
  • Anyluck with the 2.0 WP?
  • Damen Choy
    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
  • LcF
    @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.
  • Damen Choy
    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
  • LcF
    @Damen: not really, I suggest limit the number of ads for multiple posts page.
  • hariz
    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.
  • guys, why not try the adsense deluxe version, it automatically bring you different layout.
  • LcF
    @oneandhalf: Yes, I previously reviewed AdSense Deluxe.
  • Hello there!

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

    Thanks a lot
  • Thanks i will try on my blog.
blog comments powered by Disqus