Home › Forums › Feedback › get_field_ID() › Reply To: get_field_ID()
This is kinda complicated as a custom field could be attached to something else than a post type. It can be attached to a specific page, a taxonomy or a lot of other things. In fact it is attached to all the posts which correspond to the type of object(s) you attach the custom field.
That’s why (I think) the get_field_object()
requires at least one $post_id to be found.
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.