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!
ACF wouldn’t be so widely used in WordPress if it didn’t have some pretty amazing capabilities. In this article, we look at a few of the features we’ll discuss during “7 things you didn’t know you could do with ACF” at #WPEDecode later this month. https://t.co/5lnsTxp81j pic.twitter.com/Yf0ThPG1QG
— Advanced Custom Fields (@wp_acf) March 16, 2023
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.