Unified Search on BuddyPress 1.5

Just a quick note to anyone wanting to use the unified search from buddydev.org with BuddyPress 1.5:

Replace:

remove_action( 'init', 'bp_core_action_search_site', 5 );//force buddypress to not process the search/redirect
add_action( 'init', 'bp_buddydev_search', 10 );// custom handler for the search

with

add_action( 'bp_init', 'bp_buddydev_search' ); // custom handler for the search
remove_action( 'bp_init', 'bp_core_action_search_site', 7 ); //force buddypress to not process the search/redirect

And replace:

if ( $bp->current_component == BP_SEARCH_SLUG )//if this is search page

with

if (bp_is_current_component( bp_get_search_slug() )) //if this is search page

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>