Support

Account

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().