Home › Forums › General Issues › Adding custom fields search to WordPress search › Reply To: Adding custom fields search to WordPress search
In my case it’s not a custom post type, so that’s simpler. The code in https://adambalee.com/search-wordpress-by-custom-fields-without-a-plugin/ works, but it includes media files in the results (matching image filename or title – I’m not sure). Is there a way to restrict the results to only posts?
Even though, like ggeiger, I prefer code (cutting with a scalpel instead of a hatchet), I also tried ACF: Better Search. But it did even worse – it not only included media, but failed to even find posts that matched on a custom field I particularly care about, which happens to be structured as a taxonomy. Apparently that’s too hard for the plugin.
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.