Title: Persistent Search
Last modified: August 24, 2019

---

# Persistent Search

 *  [DAM](https://wordpress.org/support/users/damland/)
 * (@damland)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/persistent-search/)
 * Hi Andrea,
 * how can get and show the value of all the active fields into the Persistent Search?
   
   I think you are using a cookies, but how can I read it?
 * Thank You

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

 *  Plugin Author [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * (@dontdream)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/persistent-search/#post-11865702)
 * Hi damland,
 * _BP Profile Search_ maintains one active search for each Members directory. When
   the current page is a Members directory, the code:
 * `$request = bps_get_request ('filters');`
 * provides the active search for the current directory, otherwise an empty array.
 * The function _bps\_get\_request()_ is in _bps-search.php_.
 *  Thread Starter [DAM](https://wordpress.org/support/users/damland/)
 * (@damland)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/persistent-search/#post-11908035)
 * [@dontdream](https://wordpress.org/support/users/dontdream/) Thanks!
 * Using bps_form=clear I can remove all the filters, but is there an easy way to
   remove only one filter and keep the others active?
 *  Plugin Author [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * (@dontdream)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/persistent-search/#post-11909707)
 * Yes, you could use the ‘bps_request’ hook, and unset the filter(s) you don’t 
   need. For instance:
 *     ```
       add_filter ('bps_request', 'clear_filter', 10, 3);
       function clear_filter ($request, $type, $form)
       {
       	unset ($request['field_4_contains']);
       	return $request;
       }
       ```
   
 *  Thread Starter [DAM](https://wordpress.org/support/users/damland/)
 * (@damland)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/persistent-search/#post-11912132)
 * [@dontdream](https://wordpress.org/support/users/dontdream/) I need to put a 
   button for each filter to remove that filter (one by one), what’s the best way
   to use bps_request to unset them? thanks
 *  Plugin Author [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * (@dontdream)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/persistent-search/#post-11914715)
 * Hi damland,
 * I have that feature in my to-do list, but I haven’t found the time to design 
   it yet.
 * Probably the best way is to use AJAX and set the ‘bps_request’ cookie value with
   the remaining array of filters, whenever the user hits an individual clear-filter
   button.
 *  Thread Starter [DAM](https://wordpress.org/support/users/damland/)
 * (@damland)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/persistent-search/#post-11915574)
 * Why don’t use WP REST API to update the results without refresh the page?
 *  Plugin Author [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * (@dontdream)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/persistent-search/#post-11918942)
 * I’m not very familiar with the WP REST API yet, so I’m not sure. BuddyPress 5.0.0
   will ship with the BP REST API, and that could be taken into consideration too.

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

The topic ‘Persistent Search’ is closed to new replies.

 * ![](https://ps.w.org/bp-profile-search/assets/icon.svg?rev=1568973)
 * [BP Profile Search](https://wordpress.org/plugins/bp-profile-search/)
 * [Support Threads](https://wordpress.org/support/plugin/bp-profile-search/)
 * [Active Topics](https://wordpress.org/support/plugin/bp-profile-search/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bp-profile-search/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bp-profile-search/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/persistent-search/#post-11918942)
 * Status: not resolved