Answer the question
In order to leave comments, you need to log in
How to make such a filter ( wordpress + acf )?
Guys, how to make such a filter?
Answer the question
In order to leave comments, you need to log in
If you don't use plugins, then +1 to id_baton4eg 's answer , but with a correction: WP_Query is better instead of get_posts() - more freedom and control.
In general, if we send ajax, then there is a REST API. We saw our REST controller, and we get json output - faster, more convenient for javascript on the front.
But, there is one important nuance - such requests will normally load the backend. Therefore, for such tasks there is such a thing as Elastic Search (and analogues). There is also a WP ElasticPress plugin for it. The speed of such a bundle is space compared to the standard REST API even. Oh, and flexibility.
Maybe this article will be useful for you - https://www.smashingmagazine.com/2016/03/advanced-...
Plugin - https://wordpress.org/plugins/acf-advanced-search/
I would do this:
1) create a form with the necessary inputs
2) process it via ajax, send a post request to get_posts()
3) get a response, insert its html in the right place.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question