Home › Forums › General Issues › Adding custom fields search to WordPress search › Reply To: Adding custom fields search to WordPress search
@agn_woj99 Are you desiring to include only one custom field in the search, or are you thinking that the code we’ve been talking about would only add one at a time? I’m not sure which you’re asking, but the code I’m using (which is the same as what rocio1011 posted several times) is from this page: https://adambalee.com/search-wordpress-by-custom-fields-without-a-plugin/ (Be aware that you need to make a small change described in the last comment below the post to work with newer versions of WordPress.) This code causes the regular WordPress search to include custom fields, including even custom taxonomies, which was important for me. It includes all of them, not just one.
I’m still hoping someone will come up with code that can exclude media from the search results, but that’s a different issue.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.