OK. Here is how to replicate the issue.
1. Make a forum.
2. Add 2 topic to this forum using the front-end form.
Now the structure of this forum is something like this:
-> Example forum
-> A topic example 1
-> A topic example 2
And the count is 2 topics
.
I get this count of 2 topics by using the function: bbp_get_forum_topic_count(0, false)
.
This function is placed in bbpress/loop-single-forum.php
template.
3. Go to wp-admin to the edit screen of the topic “A topic example 1”.
4. Under the “Topic Attributes” meta box, change the forum parent, by selecting “– No parent –“.
5. Update.
6. Check the forum on front-end. The count should be 1 topic
but it still displays 2 topics
.