Skip to:

Incorrect topics count

  • Andrei Surdu


    I use this function to display the total topics count for a single forum: bbp_get_forum_topic_count

    If I change the forum parent to –No Parent —, the topic dissapears from forum section but the count does not change. See the image below:

    bbPress version: 2.5.14
    WordPress version: 4.9.5

Viewing 2 replies - 1 through 2 (of 2 total)

  • Robin W


    sorry I don’t understand the question.

    you start by quoting a bbpress function, and then changing a forum and then a ?specific? topic disappears.

    As a start, can you give the precise code you are using, and where you are using it, and how.

    Andrei Surdu


    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar