Skip to:
Content
Pages
Categories
Search
Top
Bottom

Blog Search to include Members in results page?


  • coolhunt
    Participant

    @coolhunt

    Hi Everyone,

    Im trying to consolidate my search so that when a user performs a search. it returns both blog results and members..

    1) Is there an easy way to grab the TERM from get_search_form() uses and pass it along to bp_has_members

    Im hoping to use a simple PHP snippet that I can insert in my themes search.php (which is the results page)

    maybe I can use $_Get to read the URL?

    Any ideas or thoughts…

Viewing 1 replies (of 1 total)

  • Brajesh Singh
    Participant

    @sbrajesh

    You can do it like this

    
    bp_has_members( array ( 'search_terms'=> get_search_query() ) );
    
    

    get_search_query() is the function you are looking for.

    Hope that helps.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar