Skip to:
Content
Pages
Categories
Search
Top
Bottom

Member search in mutiple profile fields


  • der_velli
    Participant

    @der_velli

    Hi. I’m looking for one search field (widget) which searchs in couple of profile fields. like name, surname, city, job (and other custom made profile fields) but i don’t want to search all fields (some fields have to be hidden for other users).
    BP Member Search would be fine, but i can only search one profile field for each search input.

    Best Regards

Viewing 6 replies - 1 through 6 (of 6 total)

  • Brajesh Singh
    Participant

    @sbrajesh

    Hi,
    Please have a look at BP profile search

    BP Profile Search

    This should help you with achieving your goal.

    Best regards
    Brajesh


    der_velli
    Participant

    @der_velli

    Hello Brajesh (again 🙂 )

    My mistake: i mean “BP Profile Search” when i said ” i can only search one profile field for each search input.” So this won’t work for me 🙁

    Best regards
    Velli


    shanebp
    Moderator

    @shanebp

    BP Profile Search will search as many profile fields as you want for each search input.
    Just follow the directions for that plugin.
    If you have additional questions, please ask them on the support forum for BP Profile Search.


    der_velli
    Participant

    @der_velli

    Hello Shane

    “BP Profile Search will search as many profile fields as you want for each search input.”

    Yes, but i want only ONE searchfield to search in name, surname, city and jobs, not for each profile field a searchfield

    best regards
    velli


    shanebp
    Moderator

    @shanebp

    Other people have the same request and solutions are provided, as you can see:
    use-1-text-box-and-search-against-2-field-types/

    For further discussion, please use the support forums for that plugin.


    der_velli
    Participant

    @der_velli

    Yeah, thats what i’m looking for. i already opened a support ticket, but you response faster 🙂

    For all followers: you can add this to the functions.php

    add_filter ('bps_field_sql', 'change_query', 10, 2);
    function change_query ($sql, $f)
    {
            if ($f->id == 5)  $sql['where']['field_id'] = 'field_id IN (5,12)';
            return $sql;
    }

    while id == 5 is the “basic” profile field ID you want to search for and in field_id IN (5,12) you can add as many profile field IDs as you like to be included in the search

    Thanks a lot!
    Problem is solved!

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