So you want to add Adsense units to your bbpress forum? Well my first plugin for bbpress allows you to do that! Just pop in your adsense code and away you go, simple!
You can see it running on my Nexus 7 Tablet forum here.
bbPress 2 Adsense Plugin
Here is a screenshot of the bbpress plugin running live on my own website, once installed your forum will look a bit like this:
Adding Adsense to bbPress
The first draft of the plugin is very straight forward, it allows you to enter an advert, for example an Amazon banner, or and Adsense block, and it will display between the first post of a thread and the second.
You then have the option to hide the ads from your regular users (you don’t want to annoy them, or encourage them to click off the site!). If you chose to hide ads, a message will be displayed to encourage visitors to join the site.
The admin screen looks a bit like this:
The plugin is published to the WordPress plugin repository and can be downloaded directly from there. Note that this plugin makes use of various filters and may interfere with other plugins. Remember to check carefully before using this on a live site. If you do have problems, it is likely to be an issue with the order in which the plugins are applied.
This is just a first draft and proof of concept, I plan to add more feature in due course:
- Fully configurable text, makes translation easy
- Add ad units to various locations, in the forum, at the end of threads, etc
- Any other ideas, let me know…
First revision now available.