Home › Forums › Bug Reports › get_field empty with admin_init hook › Reply To: get_field empty with admin_init hook
If your following what you linked to there should be no issue with using get_field() on the admin init hook because this happens after acf is initialized. Whatever your issue is it is not in the code you’ve provided.
It could be in the function called here
$post = myGetPostFunction(get_current_user_id());
or it could possibly be in how the field is defined.
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.