URL parameters

BP Profile Search › URL parameters

  • Author
    Post
  • #8733 Reply
    Clare
    Guest

    Hi,
    So I have profile search as a filter on my members directory. When I put in my search form and get my results back i.e. members directory. I click on a member profile. Then I want to return to the directory with the same Search Profile filters set.

    Is there a way you can do this with setting or anyway you can set parameters on the member URL so you can return to serach results.

    So an example would be I do a search for everybody living in the USA. I get a list of people, I click on Joe Blogs. Now I am in Joe Blogs profile and I was to return to see the rest of the people who live in the USA.

    Appreciate any help on how this could be done.

    #8735 Reply
    andrea
    Plugin Author

    Hi Clare,

    By default, the search is cleared as soon as you navigate away from the results page. To avoid that, you can add this line to your bp-custom.php or functions.php file:

    add_filter ('bps_clear_search', '__return_false');

    Please let me know if that works for you!

    #8736 Reply
    Clare
    Guest

    Thank you for the quick response but solved it in the mean time by using javascript window.history.back(); rather than a link…

    #8737 Reply
    andrea
    Plugin Author

    Great, thank you for sharing your solution!

Reply to: URL parameters
My Information