How to load jQuery in the footer – nothing works for me
You need to load your scripts in the footer so you’ll need to add them to the functions. This method works for parent themes dependent on jQuery. For child themes Change: get_template_directory_uri() To get_stylesheet_directory_uri() Example code for parent themes: function wpsites_load_scripts() { wp_enqueue_script( ‘script-name’, get_template_directory_uri() . ‘/js/example.js’, array(), ‘1.0.0’, true ); } add_action( ‘wp_enqueue_scripts’, ‘wpsites_load_scripts’ … Read more