• Mapping out a new directory build soon. Will the default WP search actually look inside the custom text fields I create here, or do u guys need an extra snippet for that? Tbh just planning ahead.

Viewing 1 replies (of 1 total)
  • Hi @jacejace

    This is not possible with the ACF plugin as it is out of the box.

    Please note that by default, WordPress does not include custom field data in search results. In order to add this data, you will need to modify the WordPress search query so that it runs in the wp_postmeta table as well.

    One way to accomplish this is to use the “update_post_meta” hook to save the ACF field data as post meta, which you can then index. Another option is to use the “posts_join” and “posts_where” filters to modify the SQL query which you can then use to search the content, which can include the ACF fields.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.