Home › Forums › Bug Reports › Javascript API returning NULL › Reply To: Javascript API returning NULL
There are a number of ways.
1) You can use the WP REST API – I won’t be much help here.
2) You can localize your JS. This is good for values that are static, always the same for the page. This will not work if values can change while any type of caching is enabled.
3) You can write your own AJAX functions to get the values
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.