Opened 16 years ago
Closed 15 years ago
#2255 closed enhancement (fixed)
merging wp search and buddypress search on same form
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 1.5 | Priority: | normal |
| Severity: | Version: | ||
| Component: | Core | Keywords: | has-patch, needs-testing |
| Cc: |
Description
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;
Attachments (1)
Change History (6)
Note: See
TracTickets for help on using
tickets.
Can I suggest that the dropdown option read 'Posts' rather than 'Blog'?