Support › General › Ajax Search and filter templateResolved
I know I can query posts via metabox, but is it possible to hook in ajax so I can update search results on the front end of the website? also caching would be a bonus too.
I can see you do this for object fields in the backend https://metabox.io/meta-box-updates-better-performance-for-object-fields-mb-core-and-new-settings-page/ but was wondering do you do the same for front end search result pages?
I can see there is a plugin called SearchWP but I am after creating my own scripts as I do not want to use 3rd party plugins.
Also I have been checking out using custom API endpoints and using them for search and filter posts. I know Metabox adds fields into the API as I have the addon installed. What are your thoughts on using the wordpress rest api over admin-ajax.php?
The feature Ajax Search is only supported for the field select_advanced to select the value. We do not handle any search function on the front end. If you want to create a search form on the frontend by using Ajax or Rest API, this article might help you to do that https://sabrinazeidan.com/wp-rest-api-search-with-autocomplete-with-vanilla-js/
thanks for the link, very useful.