• Closed topics on bbpress do not show up in the search results, and I want closed topics to hit the search as well.

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter shake1

    (@shake1)

    I am using a translation tool.
    We look forward to hearing from you.

    Plugin Author Mikko Saari

    (@msaari)

    What does it mean when a topic is closed? What happens to the topic post? What is it’s status? I know very little of how bbPress works.

    Thread Starter shake1

    (@shake1)

    Thanks for the reply.
    If you close a topic, you will not be able to reply to new replies. However, it does not hide the post.

    But when you close a topic, the topic does not appear in the search results, and we would like to make it appear.

    Plugin Author Mikko Saari

    (@msaari)

    It looks like this may be a custom post status. In that case, this should help:

    function rlv_add_status( $status_array ) {
        $status_array[] = 'closed';
        return $status_array;
    }
    add_filter( 'relevanssi_valid_status', 'rlv_add_status' );
    add_filter( 'relevanssi_valid_admin_status', 'rlv_add_status' );

    Add this to your theme functions.php and rebuild the index. Does that help?

    Thread Starter shake1

    (@shake1)

    Thank you very much.
    But I added that but it did not solve the problem.
    The closed topics are still not showing up in the search results.

    Plugin Author Mikko Saari

    (@msaari)

    I’d need to know how bbPress handles the “closed” status. Is it with a custom status and if it is, what is the name of the status? I can’t help more without this information. You can find the status of the threads from your wp_posts database table: find a closed topic and see what the post status is.

    Thread Starter shake1

    (@shake1)

    Status was closed.
    How can I help…

    post_type topic
    post_status closed

    Plugin Author Mikko Saari

    (@msaari)

    Hmm, in that case, the code above should solve the case. Did you rebuild the index after adding the code? If that doesn’t help, I’m unfortunately out of ideas. That’s the only way to get Relevanssi to include a custom post status in the results. If you check the Relevanssi admin search (Dashboard > Admin search), does that find the closed topics?

    Thread Starter shake1

    (@shake1)

    I have also rebuilt the index but for some reason it is not showing up. Admin search hits closed topics.

    Plugin Author Mikko Saari

    (@msaari)

    Ok, there’s your explanation: your front-end search is not using Relevanssi. That’s why nothing you do with Relevanssi is going to affect that.

    Admin search is Relevanssi, and as you can see, it’s working correctly.

    Do you use some kind of an Ajax search on your site?

    Thread Starter shake1

    (@shake1)

    I am using Better Messages, a plugin that allows users to chat with each other, and it seems that the plugin uses AJAX for reloading.
    However, I am not sure if this has anything to do with it.

    Plugin Author Mikko Saari

    (@msaari)

    Can I see your site? If you don’t use any search plugins, then it’s probably in your theme.

    Thread Starter shake1

    (@shake1)

    Thanks for the reply.
    I will send you the URL of the site.

    https://fanly.jp

    Plugin Author Mikko Saari

    (@msaari)

    I can’t see any particular reason why the search wouldn’t work. Here are some tools for debugging Relevanssi search issues you can try. If you search for a closed topic and check the query with Query Monitor, is Relevanssi active and returning the result?

    Is it possible Relevanssi returns the closed topics, but your theme only displays open topics on the search results page?

    Thread Starter shake1

    (@shake1)

    Thanks for the suggestion.

    I tried the admin search again and the closed topic did not show up in the search. So there may be a problem with the theme. I don’t know if they will answer, but I will contact the theme developer.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘About bbpress search results’ is closed to new replies.