Home › Forums › Feature Requests › Search Form for ACF for Custom Post Types › Reply To: Search Form for ACF for Custom Post Types
Shame there isn’t any direct support for it here
There isn’t because this is not related to ACF directly. It’s related more to the WordPress database structure (on which ACF relies) than to ACF itself.
Implementing such a functionality doesn’t depend on how the post and fields have been created. So it makes no difference if you defined field using ACF, other plugin or even manually using WordPress native custom fields support.
Firs of all you should read about WP_Query and how to write meta queries. If you want to filter existing query (add/remove/modify) then pre_get_posts filer will be useful.
If you want I can send you a simple example of a search form built this way.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.