Home › Forums › ACF PRO › Query only against post_title in acf/fields/post_object/query › Reply To: Query only against post_title in acf/fields/post_object/query
I don’t know why it is searching meta values as well as the title and content. This usually requires a plugin or adding code to the WP search query to include meta values. Whatever is causing this it is not ACF.
post_content and post_title are not meta values and are stored in the post table.
ACF uses a standard WP search query to return values when searching. This automatically searches the title and content. You would need to alter this query using the filter you suggest. There are examples of this, for example this one https://stackoverflow.com/questions/9468804/make-wordpress-search-only-in-post-title. All of the examples require altering the actual SQL query and not the WP_Query().
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.