WordPress.org

Ready to get started?Download WordPress

Forums

Relevanssi - A Better Search
Search bbpress? (5 posts)

  1. locomo
    Member
    Posted 2 years ago #

    Hi - can relevanssi be configured to search bbpress forum topics and replies?

    http://wordpress.org/extend/plugins/relevanssi/

  2. Mikko Saari
    Member
    Plugin Author

    Posted 2 years ago #

    Yes. BBPress stores forum data in a custom post type, which Relevanssi can index.

  3. locomo
    Member
    Posted 2 years ago #

    sweet .. thanks .. i'll try it out!

  4. locomo
    Member
    Posted 2 years ago #

    works great .. for other folks wanting to do this i had to add this code to my theme's functions.php file to include bbpress custom post types in the search index:

    function my_add_bbp_to_search( $post_type ) {
         $post_type['exclude_from_search'] = false;
    
         return $post_type;
    }
    add_filter( 'bbp_register_forum_post_type', 'my_add_bbp_to_search' );
    add_filter( 'bbp_register_topic_post_type', 'my_add_bbp_to_search' );
    add_filter( 'bbp_register_reply_post_type', 'my_add_bbp_to_search' );
  5. Mikko Saari
    Member
    Plugin Author

    Posted 2 years ago #

    Notice that Relevanssi has a setting you can adjust, whether it respects "exclude_from_search" or not. This is a pretty neat solution, too.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags