Home › Forums › Front-end Issues › Insert field at hook-position using function.php › Reply To: Insert field at hook-position using function.php
Hi there,
Thanks for sharing these findings.
It is likely that you are calling the get_field() function before ACF is loaded. You can workaround this by making use of get_post_meta() native function to achieve the same result.
https://developer.wordpress.org/reference/functions/get_post_meta/
I hope this info helps.
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.