• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Michele Neylon :: Pensieri

Michele Neylon :: Pensieri

Technology, Marketing, Domains, Thoughts

Adsense for WordPress – my version!

July 23, 2005 by Michele Neylon 19 Comments

Like a lot of bloggers I use adsense. Up until recently I was using a standard banner at the top of all pages, which was done by using an include in the template files.
Other people seemed to have gone to some trouble to incorporate adsense in their posts, so I thought I’d investigate further.



The original adsense plugin for wordpress isn’t fully compatible with wordpress 1.5, but Liew released a compatible version.
Neither version was capable of placing the code inline so that your post “wrapped” it ie. in the middle of the text, so a bit more digging pulled up another version. It wasn’t compatible with WordPress 1.5 either, so I merged the changes from Liew into the Maxpower version.
You can see the result in this post.
If you would like a copy of my version of the plugin please feel free to download it here
Installing it is very simple.

  1. Download the plugin
  2. Open it in a text editor
  3. Change the adsense code to use your adsense id
  4. Upload it into your plugins directory
    1. You should now activate it via the plugins manager in your admin panel. If everything is installed correctly you will now see an extra button in the editing window labelled “adsense code”
      If you want to edit the position, colours or other attributes, simply open the plugin file in a text editor and make your changes.
      Thanks to the other plugin developers πŸ™‚

      Related Posts:

      • computer-code-screens
        Dodgy WordPress Developer Tactics
      • Video thumbnail for youtube video fr7oyjnt3bm
        Luke Combs' Version of Fast Car
      • Video thumbnail for youtube video 564u39pjfui
        Thunderstruck Cover
      • Video thumbnail for youtube video sonqjkjtmaa
        Thriller was Released 40 years ago!
      • Video thumbnail for youtube video zeqb6xbeuco
        Tracy Chapman Duet With Luke Combs at Grammys
      • Video thumbnail for youtube video c36pulqpody
        Gladiator - An Over the top Cover from the Royal Marines

Filed Under: Random

Michele is founder and CEO of Irish hosting provider and domain name registrar Blacknight. Read More…

Reader Interactions

Comments

  1. Wayne says

    July 28, 2005 at 6:20 pm

    I’ve expanded the inline adsense plugin for WordPress. My version (http://www.acmetech.com/blog/adsense-deluxe/) uses an options panel within your WP admin and allows you to define any number of ad styles and reference them in posts by names, change which style to use as default, globally/selectively enable/disable ads (w/out having to disable the plugin), and includes an AdSense Sandbox tool to preview the ads Google would display for a given web page.
    cheers,
    -wayne

  2. blacknight says

    July 28, 2005 at 6:28 pm

    Wayne
    I’ll definitely be giving your version a try. It sounds like you’ve added a lot of very useful options to it.
    Does your version cater for inline ads (as above) ?
    Michele

  3. Wayne says

    July 28, 2005 at 6:39 pm

    Yeah, I think so (if I understand what you mean). If you are/were using Phil Hord’s adsense plugin, then mine simply builds upon that one. I started with his and immediately went crazy adding features. With phil’s plugin, you would add the html comment in your post where you wanted your ads to appear. Mine works exactly like that except if you simply use that placeholder, you get the ad style which you have designated as your “default” style. Amongh all the ad styles you configure, you can easily change which one is “default” and all the ads in all the posts which are refenced with change. However, each style is defined with a unique name, so you can also reference the styles with something like . This makes it trivial to use different ad styles within a single post.
    -w

  4. blacknight says

    July 28, 2005 at 6:44 pm

    Wayne
    I’ll download it and see how it works
    Michele

  5. blacknight says

    July 28, 2005 at 6:55 pm

    Wayne
    It doesn’t have the inline CSS builtin, but it can easily be added πŸ™‚
    I activated the plugin on http://www.searchenginecookbook.com and placed the following CSS and HTML around the Adsense block:
    ADSENSE

  6. blacknight says

    July 28, 2005 at 6:55 pm

    Damn πŸ™
    I can’t get the CSS to display in comments!!

  7. Wayne says

    July 28, 2005 at 7:02 pm

    Michele,
    show me an example of what you’re trying to do. Just show me a snippet of the inline css and a portion of the adsense code (you’ll want to escape the javascript stuff, or otherwise upt it in here so that it doesn’t actually pull ads into the comment).
    Alternately, email me a sample, you have my email address in my user registration.
    -w

  8. blacknight says

    July 28, 2005 at 7:22 pm

    Wayne
    I’ve put the CSS in text file which you can get from:
    http://www.mneylon.com/blog/go.php?http://www.mneylon.com/blog/wp-content/adsensestyle.txt
    Michele

  9. Wayne says

    July 28, 2005 at 7:37 pm

    I tried wrapping one of my ads in your style code. Since the adsense-deluxe plugin simply replaces the html comment with WHATEVER you define in the options admin, the style info was added to the web page when I reloaded it.
    However… I noticed a bit of a problem in that wrapping the javascript with a styled tag resulted in a netsted paragraph since in my installation of WP it seems to be auto wrapping my content in tags. To wit:
    (this is what came out in the html…)
    …
    so two points:
    1) you shouldn’t have any problem adding style info (or anything else you want) within the adsense block definitions and having that substituted into the posts. If that’s not happening for you, let me know since it worked on my setup.
    2) It might be more appropriate to use the tag instead of the paragraph.

  10. Wayne says

    July 28, 2005 at 7:39 pm

    well, that didn’t work. my pasted html sample was stripped or isn’t rendering. Let me just use alternate tags… in my web page after adding your styled [p] wrapper, I got:
    [p][p style=”blah blah”]
    [script … adsense script here]
    [/p]
    ….. my initial paragraph of content….
    [/p]

  11. blacknight says

    July 28, 2005 at 7:40 pm

    Wayne
    HTML doesn’t work in comments πŸ™‚
    You might want to have a look at my post:
    http://www.mneylon.com/blog/archives/2005/07/28/adsense-deluxe-plugin-released/
    as I’ve raised an issue you may not be aware of
    Michele

  12. Angsuman Chakraborty says

    July 30, 2005 at 6:41 pm

    AFAIK this is against AdSense TOS. Because currently AdSense prohibits you from including AdSense code in feeds(unless they have selected you for their AdSense for feed trial). If this plugin is used and you provide full feed to your users then you are essentially including AdSense Ad in feeds also.

  13. blacknight says

    July 31, 2005 at 5:43 pm

    Angsuman
    No ads appear in the feed for this site.
    Michele

  14. Wayne says

    August 1, 2005 at 9:50 pm

    And Michele, are you doing “full feeds”?
    I guess I’ll have to investigate that as well… but if you are doing full feeds and no ads are getting inserted, then it’s most likely because I’m not registered as a feed filter.
    I’ll have to investigate this some more.

  15. blacknight says

    August 2, 2005 at 8:16 am

    Wayne
    I do offer “full feeds” but, as I run it through feedburner, adsense does not display.
    Michele

  16. Wayne says

    August 2, 2005 at 3:07 pm

    The ads WERE making it into the feeds ( Yikes! ) but this has been fixed in v0.3.
    -wayne

  17. blacknight says

    August 2, 2005 at 3:16 pm

    Damn!
    I’ll have to upgrade even more plugins ! πŸ™

  18. Loren says

    May 5, 2006 at 6:25 am

    Michele,
    I’m trying your plugin but it is only working on my index page and not individual posts.
    Any changes to be made for ad to appear in posts?

  19. michele says

    May 5, 2006 at 7:32 am

    Loren
    It *should* just work πŸ™‚
    Have you tried Wayne’s plugin?
    Michele

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

dotblog founder

Mastodon

Archives

  • Bluesky
  • Instagram
  • Threads
  • Twitter

Pages

  • About Me
  • About This Site
  • Archives
  • Comments Policy
  • Contact Me
  • Newsletter
  • Privacy

Blogroll

  • Stewart Curry
  • Tom Doyle
  • Gianni Ponzi
  • Technology.ie Podcast
  • Grandad

Stalking Links

Subscribe to Michele Neylon :: Pensieri

Blogroll

  • Blacknight Blog
  • Damien Mulley
  • Gianni Ponzi
  • Gordon Hudson
  • Grandad
  • My Mastodon
  • Paul Savage – BlackDog SEO
  • Stewart Curry
  • Technology.ie Podcast
  • Tom Doyle

Sites

  • Business Travel Tips
  • Discount Coupon Codes
  • Domain News
  • Fat.ie – my diet blog
  • Film Posters
  • Film Reviews
  • Films
  • Free Desktop Wallpapers
  • Irish Blogger Discussion Forum
  • Irish Stamps
  • Movie Trailers and News
  • Paste.ie

Footer

Site hosted in Ireland by Blacknight - Content copyright Michele Neylon

Copyright © 2025 Β· Magazine Pro on Genesis Framework Β· WordPress Β· Log in