Home › Forums › General Issues › Moving theme function meta fields to ACF › Reply To: Moving theme function meta fields to ACF
Yes, the additional meta key is important, this is the ACF field key reference. Without this reference get_field() will not work, nor will many other ACF functions. There isn’t any way, simple or complex to add all of the correct field key references for all of the fields for hundreds of posts. Well I guess you could, but in my opinion it would take longer to make the changes in the DB than it would take to edit and save the posts.
In the past ACF would get value from fields defined outside of ACF and the field key reference did not need to exist. Many changes and checks have been added to ensure that a field is actually defined by ACF to make the plugin more secure and the existence of the field key reference in is part of those checks.
It might be possible to get the values using ACF if you use the field key instead of the field name, but to be honest I don’t know if this still works. If you use the field key when calling an ACF function it does not need to perform the action of looking for the reference in the DB.
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.