Home › Forums › General Issues › Adding custom fields search to WordPress search › Reply To: Adding custom fields search to WordPress search
That is searching the post meta fields but it is not adding the term name to a meta field. There is nothing in that code that indicates to me that the term name has been added to post meta.
You would need to create an acf/save_post action. In your function you would need to get the terms for the post or get the value from a taxonomy field if that is what you are using. Then you would need to use update_post_meta() to update/add the term name(s) to the post.
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.