Home › Forums › Add-ons › Repeater Field › Putting jQuery in footer › Reply To: Putting jQuery in footer
Hi @elliot,
Ideally a function to override it’s position in the header so that the plugin would be intact for any potential updates (unless, of course, you were considering changing it in an update.)
I tried modifying the wp_register_scripts like so :
$scripts = array();
$scripts[] = array(
'handle' => 'acf-field-group',
'src' => $this->settings['dir'] . 'js/field-group.min.js',
'deps' => array('jquery'),
'in_footer' => true
);
$scripts[] = array(
'handle' => 'acf-input',
'src' => $this->settings['dir'] . 'js/input.min.js',
'deps' => array('jquery'),
'in_footer' => true
);
$scripts[] = array(
'handle' => 'acf-datepicker',
'src' => $this->settings['dir'] . 'core/fields/date_picker/jquery.ui.datepicker.js',
'deps' => array('jquery', 'acf-input'),
'in_footer' => true
);
foreach( $scripts as $script )
{
wp_register_script( $script['handle'], $script['src'], $script['deps'], $this->settings['version'], $script['in_footer']);
}
but I can’t find where they are enqueued. And it seems I’m looking in the wrong place as there is no jquery migrate here.
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.