The first block goes inside your functions.php i guess,
And all others you have to add where to show – inside your template files. example loop-single-forum.php
That fie can be found in your bbpress plugins directory.
wp-content / bbpress / templates / defaults / bbpress / ** here **
Don’t edit files from the bbpress folder inside your plugins folder because those will be overwritten when bbPress updates.
Just copy files that you need to edit towards your theme folder just like this:
wp-content / themes / [ your theme name ] / bbpress / ** here **