Re: Getting forum page number
This is also straightforward to do, but I sure would like to know why someone would do such a thing.
You can’t mimic the post_position trick because no positioning is tracked by bbPress for topics. bbPress shouldn’t even use post_position anyway but it does it to accelerate the alternative looking up the position by date.
You’d have to do a mysql query that simulates the get_latest_topics but returns only topic_id’s and then find the position of the desired topic_id in the resulting array. Then you divide by number of topics per page and there’s your page number.