Re: Retrieving forum ID from post ID
It’s extremely easy to get
topic <-> post relationships in bbPress.
Depending on where you are, you may just be able to do a
Then $topic or $bb_post will have the following objects inside:
You use it like this:
global $topic; echo "$topic->topic_title";
or to answer your original question:
global $bb_post; echo "$bb_post->forum_id";
Of course doing it this way bypasses any filters that may be in place from plugins but that may not matter if you are just trying to do something simple.