• Resolved ablak1

    (@ablak1)


    hi, the feature to search for someone with BP profile search from the members directory is great! What I am trying to achieve, is to search for 1 result based on a unique ID. In this way, people can be searched by their ID to check they are verified. So, I would want someone to be able to give their unique ID, and for other people to check that this is a valid person by using this search function and just get that 1 result returned by the search. I noticed though that although I can set up the search and it works pefectly, if I then select the link to clear the result, it displays all results on the members directory. I was wondering if there is a way to prevent this? I wondered e.g if there is a way I could hid the “clear” link and only leave the “search again” link, so that people are required to go back and search for 1 individual result each time? Thanks for any advice!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Andrea Tarantini

    (@dontdream)

    Hi ablak1,

    If you wish to remove the Clear link, you can add this code to your bp-custom.php file:

    add_action ('bps_before_filters', 'remove_clear');
    function remove_clear ($F)
    {
    	foreach ($F->links as $path => $label)
    		if ($label == 'Clear')  unset ($F->links[$path]);
    }
    
    Thread Starter ablak1

    (@ablak1)

    Thanks so much, that worked ?? Much appreciated Andrea.

    Plugin Author Andrea Tarantini

    (@dontdream)

    Great, you’re welcome!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘prevent all members being shown when clearing search result’ is closed to new replies.