Forums › Forums › Search & Filter Pro › Refresh the active query object with AJAX filtering
Tagged: ajax, search data
- This topic has 3 replies, 2 voices, and was last updated 8 years, 2 months ago by
Trevor.
-
Anonymous(Private) January 5, 2018 at 8:57 pm #150781
I have a Search & Filter Pro search form set up using a Post Type Archive and loading with AJAX. Searching and filtering is working great ????
I would like to show the list of the active terms using the info in the Accessing the Search Data article.
I am able to access and display the current active data, but it does not update when a new term is selected and new results are loaded with AJAX. It only updates when I refresh the page.
Is there a way to update the accessible search data upon Ajax load, in addition to page load?
Thanks!
Anonymous(Private) January 8, 2018 at 2:45 pm #151119haha yes. That makes total sense, and it’s working as expected now. I was testing the output at the top of the file without thinking about where the results refresh…
One more thing… I would like to wrap the label and term in markup. Is there a way to return the label and term values separately?
For instance,echo $sf_current_query->get_field_string("_sft_location");returns “Location: Africa”, but I would like it to read<dt>Location:</dt><dd>Africa</dd>.Thanks!
Trevor(Private) January 8, 2018 at 3:13 pm #151132I am not sure. IF it is possible, it would be using the Filter Input Object filter.
-
AuthorPosts