Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search results don't always honour theme

  • I’m running bbpress 2.0 rc-5 with the default styling included with bbPress. I have customized my theme functions to include forums, topics and replies in search results.

    i.e.,

    // Add Forums, Topics and Replies to search results
    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' );

    When the first search result is a page or post, the results are formatted according to search.php (as expected):

    http://www.climberswa.asn.au/?s=frankland

    When the first search result is a forum, topic or reply, the results don’t use search.php and seem to render using bbpress template parts:

    http://www.climberswa.asn.au/?s=albany

    This looks particularly bad when the first result is a topic as it will display the threads:

    http://www.climberswa.asn.au/?s=cawa

    Is this a defect in bbpress intercepting the search or a limitation of using the default styling?

Viewing 1 replies (of 1 total)

  • John James Jacoby
    Keymaster

    @johnjamesjacoby

    It’s a bit of both, and part of the reason why search integration isn’t included in 2.0. There just isn’t a graceful way to do it yet. You’re on your own for now to find (and hopefully share) a solution.

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