Support

Account

Home Forums Add-ons Options Page Uncaught ReferenceError: acf is not defined Reply To: Uncaught ReferenceError: acf is not defined

  • hope this answer helps some poor lost souls.

    jquery must load before the acf stuff. for us, the problem was having async set on the script tag in an add_filter function:
    <script type='text/javascript' async src='//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js'></script>

    note that this is output by in in <head> by <?php wp_head(); ?>

    we wrapped it with an is_admin() check thusly:

    if(!is_admin()) {
      add_filter( 'script_loader_tag', function ( $tag, $handle ) {
        return str_replace( ' src', ' async src', $tag );
      }, 10, 2 );
    }