I have a forum “Relationships” and a topic “abc”.
What else do I need do to with the database to have topic “abc” listed under forum “Relationships”, apart from the following?
-
Topic “abc” clearly shows that it’s in forum “Relationships”
1.1. In WP backend view

1.2. On frontend

1.3. In database

-
However, forum “Relationships” shows 0 topics
2.1. On frontend

wp_postmeta table

Background info
The forum is created using WP backend.
The topic and its postmetas and the forum’s postmetas are added by my PHP script.
(this is because I’m migrating data from 1 old WordPress site to a new one using my PHP script;
there are 2 WordPress databases here so I can’t leverage on WordPress functions)
Apparently, inserting all the postmetas for the topics and to the forum they belong to solved the problem here.
I originally thought I needed only a few important postmetas e.g. _bbp_topic_count
The same idea applies to a topic and its replies as well.