Forums › Forums › Search & Filter Pro › Results initially added via AJAX
Tagged: ajax
- This topic has 8 replies, 2 voices, and was last updated 5 years, 11 months ago by Trevor.
-
Anonymous(Private) December 11, 2018 at 11:02 am #195845
Hi there,
I have a page that uses a button to to asynchronously bring in the wp_query results set that I would like Search and filter to filter on. I need to pass the filter query to this ajax function. Currently as the results are initially given via AJAX the S&FPro does not work at all obviously.
Any help would be appreciated.
Thanks,
DanAnonymous(Private) December 11, 2018 at 11:33 am #195858I will try and explain more clearly. I appreciate you getting back to me.
On page load I do not wish any posts to be displayed.
I would like the user to read a message. Then hit ‘start’ – the start button is an AJAX call to my wp_query that then returns all the posts.
It is these posts that are returned via the AJAX that I would like to then filter using S&FPro.
Hope that makes sense.
Trevor(Private) December 11, 2018 at 12:45 pm #195880You can use PHP to access the query, see this page:
https://searchandfilter.com/documentation/accessing-search-data/
Are you using php or javascript to build the query?
Trevor(Private) December 11, 2018 at 3:23 pm #195909This thread might help you:
https://support.searchandfilter.com/forums/topic/accessing-field-slug-on-search-results/
… and this search will give similar threads I think:
https://support.searchandfilter.com/forums/search/sf_current_query+get_array+field+%5Bvalue%5D/
-
AuthorPosts