Support » Plugin: bbPress Search Widget » [Plugin: bbPress Search Widget] Why drop-down?

  • I’m a little surprised there is a dropdown in the widget, and can’t imagine a user actively wanting to search forum titles and descs instead of every post type throughout the forum.

    I’m glad this plugin exists though, I’m patching up my own to take out the dropdown.

    I’ve taken out the dropdown, and replaced it with this:

    $form .= '<input type="hidden" value="forums" name="post_type">';

    And to search all three post types, modify query vars as such:

    add_action('parse_query', 'maybe_modify_query_for_forums_search');
    function maybe_modify_query_for_forums_search($query) {
    	if( !$_GET['s'] && !$query->query_vars['post_type'] == "forums")
    	$query->query_vars['post_type'] = array('topic', 'forum', 'reply');
    	$query->query['post_type'] = array('topic', 'forum', 'reply');
Viewing 3 replies - 1 through 3 (of 3 total)
  • Note: you should actually use “forum” instead of “forums” for the desired result, depending on the post type slug you use.

    Hi there!

    Thanx for your feedback, I will look into the issues soon as there is already some updated planned for the plugin.

    The main reason for the dropdown was to better refine search results – but it may not be wanted in all cases. So your solution is the other alternative. Based on user feedback it’s 50/50 for all combined or keeping the dropdown.

    I’ll try your patch and maybe include it by default in the future!

    Thanx again, Dave 🙂

    Plugin Author daveshine (David Decker)


    Hi there, I just updated the plugin to version 1.1 and hopefully it works for you now better. We changed/improved a few things, for example the drop-down is gone, now automatically only searches in topics/replies. Hope you like it.

    Thanx, Dave 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: bbPress Search Widget] Why drop-down?’ is closed to new replies.