Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Add you blog search to the search


Pedro Miguel
Participant

@pedromiguel

ok, found the solution, I will also submit a ticket on trac

on bp-core-tempaltetags.php change this:

function bp_search_form_type_select() {
// Eventually this won't be needed and a page will be built to integrate all search results.
$selection_box = '<select name="search-which" id="search-which" style="width: auto">';

if ( function_exists( 'xprofile_install' ) ) {
$selection_box .= '<option value="members">' . __( 'Members', 'buddypress' ) . '</option>';
}

to this:

function bp_search_form_type_select() {
// Eventually this won't be needed and a page will be built to integrate all search results.
$selection_box = '<select name="search-which" id="search-which" style="width: auto">';
$selection_box .= '<option value="blog">' . __( 'Blog', 'buddypress' ) . '</option>';

if ( function_exists( 'xprofile_install' ) ) {
$selection_box .= '<option value="members">' . __( 'Members', 'buddypress' ) . '</option>';
}

and on bp-core.php

change this:

if ( !$slug || empty( $slug ) ) {
switch ( $search_which ) {
case 'members': default:
$slug = BP_MEMBERS_SLUG;
$var = '/?s=';
break;

to this:

if ( !$slug || empty( $slug ) ) {
switch ( $search_which ) {
case 'blog': default:
$slug = '';
$var = '/?s=';
break;
case 'members':
$slug = BP_MEMBERS_SLUG;
$var = '/?s=';
break;

Skip to toolbar