• Resolved magland

    (@magland)


    Hi, I am using buddypress with the buddypress global search plugin.

    There appears to be a compatibility issue between relevanssi and buddypress global search as when relevanssi is active my search results page returns no results, just a blank page.

    I am using the global search plugin to search buddypress specific features such as members, groups, activities, etc.

    I have several custom post types and taxonomies registered on non buddypress sections of the site for which I’d like to use the relevanssi search.

    I found I could do this with the following code to disable relevanssi until needed:

    // prevent relevanssi breaking our buddyress global search plugin...
    // remove relevanssi in all cases unless we manually run a relevanssi_do_query
    function pobl_buddypress_no_relevanssi($query) {
    	remove_filter('posts_request', 'relevanssi_prevent_default_request'); 
    	remove_filter('the_posts', 'relevanssi_query');
    }
    add_action( 'pre_get_posts', 'pobl_buddypress_no_relevanssi' );

    Then when querying my custom post types I simply use:

    relevanssi_do_query($my_query);

    This works fine for me in relevanssi 3.5.12 but has stopped working since upgrading to 3.6.2.1

    If I roll back to 3.5.12 it works again.

    Has anything changed that would cause these to no longer work:

    	remove_filter('posts_request', 'relevanssi_prevent_default_request'); 
    	remove_filter('the_posts', 'relevanssi_query');
    • This topic was modified 7 years, 4 months ago by magland.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mikko Saari

    (@msaari)

    That’s still how you disable Relevanssi, but version 3.6.0 changes the relevanssi_query priority from 10 to 99. So:

    remove_filter('the_posts', 'relevanssi_query', 99);

    Thread Starter magland

    (@magland)

    yup that seems to have fixed it, thanks!

    • This reply was modified 7 years, 4 months ago by magland.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Buddypress global search compatibility issue’ is closed to new replies.