Home › Forums › General Issues › Load JS script after ACF › Reply To: Load JS script after ACF
I just tested out that exact code and it worked just fine. You don’t need PHP to interact with ACF’s javascript API. So accessing it with the global acf
object like you are, should work fine.
The issue must be elsewhere, perhaps in your path to the script?
Can you log out other things successfully to verify that your script is enqueued properly?
Try logging out a string like: console.log('testing')
does that work alright so we know the enqueue is correct?
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.