Having developed a number of WordPress plugins and being a fan and user of bbPress, I figured it was time to have a bash at developing plugins for this platform as well. bbPress functions almost exactly like WordPress and though a plugin has it’s own plugin API (though not documented as yet).
AdSense for bbPress is my first bbPress plugin and it’s currently in use on my forums (link below). I originally hard coded AdSense into my theme but this meant I needed to update it each time a new version of bbPress or whenever I changed themes. This plugin does away with that requirement and allows you to show your AdSense ads as posts in each thread of your forums. Since the ads emulate forum posts people are more inclined to look at them and hence your CTR will increase as apposed to if you simply hard coded it somewhere into your theme.
An additional benefit is that AdSense for bbPress also allows you to select a post number you wish to have your different ads displayed at. For example you could have a half banner displayed as your first post, a leaderboard displayed as your third post and a link unit as a randomly selected post.
AdSense for bbPress is live and can be downloaded here.
Please note that bbPress for AdSense is currently restricted to the two default themes that come with bbPress until I can figure out how to manipulate themes properly. However, a savvy user may be able to alter the HTML output of the plugin to comply with their own theme.
You can discuss this article and see what others are saying about it in the WordPress Discussion Forum
Did you find this article useful? Why not buy Sean a coffee?

13 comments ↓
I really like your plugin… love how it looks like a post!
however, I am getting an error… this txt is displayed on EVERY post in the forum:
Warning: Missing argument 1 for bbad_ad_block(), called in /homepages/4/d155792173/htdocs/razetheworld/forum/bb-templates/superbold-bbpress/post.php on line 1 and defined in /homepages/4/d155792173/htdocs/razetheworld/forum/bb-plugins/adsense-for-bbpress/adsense.php on line 36
Logan: Thanks for pointing this out, I’ve fixed and uploaded a new version which you can download any time.
Not working for me.
I’m using bbPress 0.9.4, and the plugin doesn’t show up anything in the topics. Not even an error message.
Do you know why?
Hi Sean, not working for me either. The ads don’t show up. Is there any restriction on ad format and size ?
Hi,
The problem i seem to be getting is that whenever i change any settings on my admin pages all the ad info i typed in is deleted. Its really annoying to have to go and find my ad code again and retype everything.
Could you take a look at that bug?
Thanks!
hi, this is a very good plugin but on my bbpress 0.9.0.4 (latest) the plugin reset the configuration and all the field result empty… what’s the problem?
thanks!
Installed your plug in and tried the random option. Never saw an ad so I went in and disable R but set to display as post 2, 7, 12. Must have not done something correctly because I don’t see messages like the one in your BBS.
WP 2.7.1 Your latest version . WordPress is sharing a database with bbPress. I integrated usernames and passwords between the two.
As far as I understand, all I needed to do was but the Adsense code in the box and set the message number value correct?
I do know that Adsense refuses to display more than three ads at a time and was wondering if Adsense is not displaying ads at the new URL for some reason? Not sure.
Terrific idea! I’ll keep looking at your site to see if I missed something.
Regards
Oh and I’m using 468×60 ads.
…and the plugin lives in the plugins directory not my-plugins.
Nice plugins….Awesome.
In order to have the ads show up, you need to add a line to your post.php file. Here are the installation notes: http://bbpress.org/plugins/topic/adsense-for-bbpress/installation/
Although step 2 of the installation notes indicate to add before in the post.php file, it should actually be added before <div id="position-”>. It should literally be placed as the first line in the post.php file.
This should not only make the ads appear now, but also resolve the problem of the posts below the ad appearing at 100% the screen width.
How can I have the add to show up after the first post?
thank you very much for this plugin
That’s simple, simply post your code on any of the boxes provided, and then add “2″ without quotes to the box besides the ads, that’s the one labeled “At post:”
Thanks for the great plugin.
Trackbacks
Leave a Comment