bbPress Ads lets to insert any kind of code, and so even ads script like the one of AdSense, on bbPress generated page. The injection points are:
- before and after the single forum page where all topics are listed
- before and after the single topic page where all replies are listed
- before the new topic and the new reply form (pretty useful to give evidence to your forum rules)
- between the topics and the replies blocks (perfect to inject advertisement)
- just before and after the single reply text (maybe not very useful)
Anyway check the configuration panel for other injection points.
Incredible test mode
In test mode the administrator, and only the administrator, sees the forum pages with all injection areas active with a green box inserted as reference. The green box contains a “key” which can be matched in the administration area to find out the corresponding configuration.
It is light
Best practices has been used to make it light, you shouldn’t be able to measure the blog load impact.
Syntax Highlight and Autocompletion
The code blocks use “Code Mirror” as editor so you have the syntax highlight for HTML, JavaScript, CSS and PHP. Not only: there is the code completion (press CTRL+SPACE) and the HTML validity check.
The counter
To inject between the elements of a list (topics or replies) you need a counter. Since the injections can run PHP code you can easily create a selective injection:
<?php if ($count == 3) { ?> ...your ads html/javascript code... <?php } ?>
of course it make sense only on loops. See the configuration panel. Don’t be scare by this simple PHP code!
Shortcodes
The injected code can have shortcodes, they will be rendered. It is useful, for example, to inject a registration form at the end on the forum/topic page where is required to login to post.
Tips
When to insert AdSense
A good starting point is to add AdSense every four replies and then one AdSense slot at the end of the replies loop. To inject the slot interleaved you can use:
<?php if ($count == 4 || $count == 8) { ?> AdSense snippet here <?php } ?>
In my personal experience the 300×250 block works very well in dekstop and mobile versions.
Center an AdSense block
Really I don’t like at all the ad blocks left aligned. To center a 300×250 block surround it with:
<div style="width: 300px; height: 250px; margin: 10px auto 20px auto;"> Ad snippet </div>
Adjust as need for differently sized blocks.
Rules in the right place
If you need the users to respect forum rules, do not expect they read your long terms of use page. Add the most important points just over the new topic and new reply forms. That will reduce the moderation effort and if someone does not respect the rules you’re authorized to simply delete the topic or reply without notice.
Invitation to sign up
To write in a forum users should sign up. Why not offer this possibility directly at the end of topic and forum pages (where most likely people want to start a thread or reply)? You can try the plugin wp registration, it has shortcode you can inject.
In my experience, enabling sign up without a page change is a must.