Search Buddypress members

Ivory Search Forums Support Search Buddypress members

Viewing 4 reply threads

You must be logged in to create new topic or reply to the topic.

  • Author
    Posts
    • #10902
      jon2022
      Participant
      • Topics: 1
      • Replies: 1

      Hi.
      Is there a way to enable the search to search through BuddyPress members?

      thanks

    • #10903
      jon2022
      Participant
      • Topics: 1
      • Replies: 1

      I think I sorted this. I am now displaying the Author in the AJAX settings. This adds the author and links to profile.

    • #10904
      Ivory Search
      Keymaster
      • Topics: 0
      • Replies: 1,824

      Awesome great to see you got that sorted.

      Please advise if you have more questions.

      Have a fantastic day!

    • #25232
      Emmanuel Ken
      Participant
      • Topics: 0
      • Replies: 1

      Hi,

      Is it possible to enable Ivory Search’s AJAX functionality to include BuddyPress activity content in the search results?

      We’re currently using BuddyPress Global Search alongside Ivory Search. When a user presses enter after typing a query, the full search results page correctly displays activity content. However, the AJAX live search dropdown does not include any activity results.

      I attempted to use the following snippet to include activity in the AJAX results, but it doesn’t seem to be working as expected:

      // Add BuddyPress activity to Ajax search
      add_filter( ‘bp_global_search_ajax_results’, ‘include_activity_in_ajax’, 10, 2 );
      function include_activity_in_ajax( $results, $search_term ) {

      // Safety check to ensure BuddyPress is active
      if ( ! function_exists( ‘bp_has_activities’ ) ) {
      return $results;
      }

      // Query BuddyPress activity content
      if ( bp_has_activities( array(
      ‘search_terms’ => esc_attr( $search_term ),
      ‘per_page’ => 5
      ) ) ) {
      while ( bp_activities() ) {
      bp_the_activity();

      $results[] = array(
      ‘title’ => wp_strip_all_tags( bp_get_activity_content_body() ),
      ‘url’ => bp_get_activity_thread_permalink(),
      ‘type’ => ‘activity’,
      );
      }
      }

      return $results;
      }

    • #25265
      Ivory Search
      Keymaster
      • Topics: 0
      • Replies: 1,824

      @EmmanuelKen Currently, the Ivory Search plugin does not provide this functionality but I will consider implementing it in the future version of the plugin.

      In the meantime, you can do this by developing a custom code.

      If you are not a developer, you can consider hiring a developer to develop it. You can hire a developer from any freelance site or WordPress agency.

      You can also consider hiring me to develop it for you using the form https://ivorysearch.com/custom-work/

Viewing 4 reply threads

You must be logged in to create new topic or reply to the topic.