Question

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?

  1. Topic "abc" clearly shows that it's in forum "Relationships"
    1.1. In WP backend view
    enter image description here 1.2. On frontend
    enter image description here
    1.3. In database
    enter image description here

  2. However, forum "Relationships" shows 0 topics
    2.1. On frontend
    enter image description here

wp_postmeta table
enter image description here

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)

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top