Google Adsense with bbPress forum

Here’s a quick guide on how to integrate Google Adsense with your bbPress forum without much hassle.

 

1 – Use a FTP program to find the 2 files needed to add your Adsense code. Theses files are header.php and footer.php which should be found within /forum/bb-templates/your template/header.php and forum/bb-templates/your template/footer.php.

2 – Open the header.php file with a text editor like notepad or notepad++ and find the following code:

< div>
<?php search_form(); ?>
</div>
</div>

< Add Adsense Code Here>

<div id=”main”>

<?php if ( bb_is_profile() ) profile_menu(); ? >

Note: You may want to add <div align=”center”> before the Adsense code, and </div> right after so your ad unit will be centered.

3 – Once you have added the code as above, save the file.

4 – Open the  footer.php file with your text editor and find the following code:

</div>
</div>
<div id=”footer” role=”contentinfo”>

< Add Your Adsense Code Here >

<p><?php printf(__(‘%1$s is powered by<a href=”yourdomain.com”> your blog name</a>’),
bb_option(‘name’), “http://bbpress.org”) ?></p>

<!– If you like showing off the fact that your server rocks –>

5 – Insert Adsense code as above and SAVE your file on the server.

 

You’re done!  Adsense activated!

More articles you may enjoy:

Facebook Comments

comments

About Jonathan G. Nelson

Jonathan G. Nelson is the editor-in-chief and owner of NERD TREK. He is also owner/publisher at AAW Games / AdventureAWeek.com, a tabletop gaming company based in Snoqualmie, WA. Connect with Jonathan via Facebook.