Home › Forums › General Issues › Get conditional field by name › Reply To: Get conditional field by name
If the field does not have an entry in the DB for the post you are getting it for then you cannot get it by name. ACF uses the field key, when you supply the field name then ACF looks up the key by finding the field key reference for in the DB and uses the post ID and field name to get it. If there is no value saved in the DB then there is no field key reference and ACF is unable to locate the field.
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.