Home › Forums › Add-ons › Options Page › Uncaught ReferenceError: acf is not defined › Reply To: Uncaught ReferenceError: acf is not defined
As mentioned above, the problem seems to be the load order.
To ensure that jquery is loaded before various inline scripts get executed, we did the following:
Replace
(function($) { ... })(jQuery);
with
jQuery(document).ready(function() { ... });
in
…/wp-content/plugins/advanced-custom-fields/core/controllers/input.php line 102
…/wp-content/plugins/advanced-custom-fields/core/fields/_functions.php line 560
This solved our issues both regarding non-reponsive “Add image” buttons, as well as some conditional logic used to toggle field visibility.
Hope this may be of help to someone, and a big thanks to Elliot for a great plugin.
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.