Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbPress 2 – Is there a way to search the forums?

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

  • Anointed
    Participant

    @anointed

    At the moment searching the forums is turned off while it is being reworked. It is easy to turn it back on via the theme functions file, but the output results will look odd as mixing forum topics/replies together on a search results page doesn’t work to well with default templates.

    How would you turn it on in functions?

    Thanks

    I would like to know that also..

    Just to test it, maybe i google with Google (site) Search stuff.

    Are there more features that has been disabled because they are still working on them?

    At my forum the Tagged Topics will not get listed by the Tag name when i click on them.

    Lest say i add the word bbPress as a Tag to 5 different topics and after that i click on the Tag ‘bbPress’ is shows ALL topics not only the 5 topics that involve the Tagged (word) ‘bbPress’

    Check out http://gist.github.com/1243500

    As mentioned, you are going to have to do some poking around in order for the results to be returned in an orderly fashion :)

    Hi Jared,

    That will definitely help :)

    I was actually referring to a Forum *only* search, and not sight wide using the site search. Most forums have this feature.

    Thanks

    Currently with bbPress there is no way easy do that, unfortunately – at least not that I’m aware of! :P

    If you don’t know of a way… it doesn’t exist then :)

    Thanks!

    Thank you for the link.

    Well it nice to see something turn up, something is always better as: No Results found


    Anointed
    Participant

    @anointed

    I am really curious to hear what the best approach to styling the different types of output is.

    Does anyone have any good examples of a search results page that returns multiple post-types, yet appears proper?

    I usually just use a function to output the post-type in the css class for each item returned and then rely upon the css for custom styling.

    *I’ve also gone the route of using custom templates for each post-type within the search results but that got really tedious very quick.


    Anointed
    Participant

    @anointed

    @jaredatch

    ‘// Limit search to topics/replies

    add_filter(‘get_search_form’, ‘bbpress_search_limit’, 10, 3);

    function bbpress_search_limit($form, $search_text, $button_text) {

    $onfocus = ” onfocus=”if (this.value == ‘$search_text’) {this.value = ”;}””;

    $onblur = ” onblur=”if (this.value == ”) {this.value = ‘$search_text’;}””;

    $bbpress_form = ‘

    <form method=”get” action=”‘ . get_option(‘home’) . ‘/” >

    <input type=”text” value=”‘. $search_text .'” name=”s”‘. $onfocus . $onblur .’ />

    <input type=”hidden” name=”post_type” value=”topics” />

    <input type=”hidden” name=”post_type” value=”replies” />

    <input type=”submit” value=”‘. $button_text .'” />

    </form>

    ‘;

    if (is_post_type_archive( ‘forums’ , ‘topics’ , ‘replies’ ) || is_singular( ‘forums’ , ‘topics’ , ‘replies’ ))

    return $bbpress_form;

    else

    return $form;

    }’

    From the hip… not tested, but I think you get the idea.

    *I am just guessing on the conditionals for returning bbpress_form and probably would rework that portion entirely.


    mweatherill
    Member

    @mweatherill

    Just saw a fix for this has been posted here: https://bbpress.trac.wordpress.org/ticket/1575#comment:8

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