Title: Clear Upon Refresh
Last modified: December 15, 2017

---

# Clear Upon Refresh

 *  Resolved [jguenther](https://wordpress.org/support/users/jguenther/)
 * (@jguenther)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/clear-upon-refresh/)
 * Hello,
 * First of all, love the plugin. Accomplishes many functions that make using a 
   directory MUCH easier (you really should charge for this 🙂
 * Question is, is it possible to revert back to having it clear the search upon
   refreshing the page. While saving the search results may be beneficial, our users
   run many searches throughout the day and use links on the BP profile (which perform
   a search when clicking). Problem is, they have to remember to clear their search
   each time, or else clicking a link in the profile just takes them to their prior
   search and causes some frustration.
 * Thank you!

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

 *  Plugin Author [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * (@dontdream)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/clear-upon-refresh/#post-9788024)
 * Hello [@jguenther](https://wordpress.org/support/users/jguenther/),
 * > clicking a link in the profile just takes them to their prior search
 * That shouldn’t happen, a new search automatically overrides the previous one.
 * Could you please provide more details, and possibly a link to the page showing
   the problem?
 *  Thread Starter [jguenther](https://wordpress.org/support/users/jguenther/)
 * (@jguenther)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/clear-upon-refresh/#post-9794111)
 * Hi Andrea,
 * You can see what’s happening here:
 * [https://player.vimeo.com/external/247877633.hd.mp4?s=37b9d2a0673d477fe8cdfabc2c30f938a5c46a88&profile_id=175](https://player.vimeo.com/external/247877633.hd.mp4?s=37b9d2a0673d477fe8cdfabc2c30f938a5c46a88&profile_id=175)
 * Notice, I initially searched “Ed,” then visited a profile and clicked a link 
   which should perform another search. Instead, I’m taken back to the results for“
   Ed.”
 * Also, I did try with a default theme as well as all plugins deactivated except
   this one and had the same results.
 * If you need login credentials to test in our dev environment, let me know how
   I can send those privately.
 * Thanks!
 *  Thread Starter [jguenther](https://wordpress.org/support/users/jguenther/)
 * (@jguenther)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/clear-upon-refresh/#post-9794119)
 * I should add that, after looking again, it does perform a search for the term
   clicked on in the link AND the original term. So after clicking on the link results
   retained were all users with that term and “Ed” in the name. Ideally, it would
   be nice if clicking the link cleared the previous search instead of adding to
   it.
 * Thanks!
 *  [danmburu](https://wordpress.org/support/users/danmburu/)
 * (@danmburu)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/clear-upon-refresh/#post-9794939)
 * I’m also facing the same issue. The data on search fields persists on refresh
   until someone clicks the clear button. If I search for a member and I navigate
   to a different page, the search widget retains the search parameters. Kindly 
   advise on how to make the form clear the parameters on page refresh or on navigating
   to a different page.
 *  [Carsten Lund](https://wordpress.org/support/users/carsten-lund/)
 * (@carsten-lund)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/clear-upon-refresh/#post-9795957)
 * As long as there is no option for specifically saving a search, I think it is
   an advantage that the search form is not cleared, when leaving or refreshing 
   the page, because users often perform the same search over and over again.
    That
   said, a search save option, with the possibility of naming a search would be 
   nice.
 * I have noticed that when using the short code i.g. on the front page, the clear
   button and the hide/show form button are not present, so it is not possible to
   clear the form otherwise than deleting all content in the search form manually.
 * regards
 *  Thread Starter [jguenther](https://wordpress.org/support/users/jguenther/)
 * (@jguenther)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/clear-upon-refresh/#post-9796482)
 * I agree there should be an option. In any case, at the very least the search 
   should completely reset when a user clinks a link in the profile. I think it’s
   safe to say if they are clicking a profile search, they are not intending to 
   narrow a search further, but rather perform an entirely new search (i.e. not 
   searching for their previous parameters AND the term from the link).
 *  Plugin Author [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * (@dontdream)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/clear-upon-refresh/#post-9803723)
 * Thank you all for your comments, you made some very good points.
 * I’m going to make these changes in the next BP Profile Search version:
 * 1. A search activated with a profile link clears the previous search;
 * 2. You can choose to always clear the search on page refresh adding this code
   in bp-custom.php:
 * `add_filter ('bps_clear_search', '__return_true');`
 * 3. A new ‘Clear’ button in a search form clears the form (and the search).
 * By the way, the first two changes are in SVN already, so if you reinstall the
   plugin you’ll get them.
 * Please let me know if these changes work for you!

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

The topic ‘Clear Upon Refresh’ 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
 * 4 participants
 * Last reply from: [Andrea Tarantini](https://wordpress.org/support/users/dontdream/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/clear-upon-refresh/#post-9803723)
 * Status: resolved