Try adding this to functions.php
<?php
// Custom scripting to move JavaScript from the head to the footer
function remove_head_scripts()
{
remove_action('wp_head', 'wp_print_scripts');
remove_action('wp_head', 'wp_print_head_scripts', 9);
remove_action('wp_head', 'wp_enqueue_scripts', 1);
add_action('wp_footer', 'wp_print_scripts', 5);
add_action('wp_footer', 'wp_enqueue_scripts', 5);
add_action('wp_footer', 'wp_print_head_scripts', 5);
}
add_action('wp_enqueue_scripts', 'remove_head_scripts');
?>
Related Posts:
- Enqueuing Script in functions.php vs on the page
- Run a jquery script on on a certain template page
- How to load jQuery in TOP of wp_footer?
- Include Jquery libraries in wordpress theme?
- Apply jquery script to only woocommerce product pages and categories
- Enqueuing External Javascript functions.php
- How to enqueue JavaScript for specific WordPress pages only?
- jquery won’t load in footer
- Replace menu links with # and add name to its li
- wp_is_mobile dequeue not working
- Why won’t my scripts load?
- Loading CDN that requires jQuery in WordPress
- Not sure if enqueuing js scripts properly
- Scripts not appending to element in AJAX call – why?
- How to search using ajax for exact phrase or words in an input field?
- I can’t enqueue my scripts – They literally aren’t being added to my site
- Attempt to change jQuery version caused White Screen of Death
- jQuery does not work
- In jquery use php variable to execute an enqueued jquery file
- wp_enqueue_script | Help me figure out what is causing jQuery is not defined
- Theme JS is available but theme CSS isn’t
- Auto scroll to id on page load on all pages except home page. Only do this on mobile
- Why a SlideShow (made using JQuery FlexSlider) can’t work if I load it form functions.php but work if I load it from my footer.php file? [closed]
- Creating multiple category drop down
- How to setup a popup registeration page in wordpress with function.php
- colorbox not loading in
- wp_enqueue_script() not working
- wp_set_object_term via js btn frontend
- How To Display Author Popup on Entry Meta (Genesis Framework)?
- Multiple Notifications SetInterval
- True parameter but jquery register in header and not in the footer with wp_register_script
- Automatic add space if user enters number(any digit)
- WordPress Jquery+scripts enqueue issue
- custom post with loading script per single post
- Why are some custom javascript files working but some are not
- WordPress Javascript Widget jQuery Dependency Issue
- java script error Uncaught SyntaxError: Unexpected token ILLEGAL
- How do I get my nav menu to show sub pages?
- Animated Accordion [closed]
- dynamically import array from another js file in WordPress
- iOS and ajaxComplete
- WordPress Enqueue for homepage only, functions.php, wp-framework
- Enqueue Script with data attributes
- Replacing select2 in admin backend for all selects
- Including javascript for a shortcode
- Run Product Filter Javascript On Page Template
- jQuery plugin function is not a function
- Add confirmation popup on “Move to Trash”
- How do I get my page to load the jQuery UI Effects library?
- Unable to get_the_content(); of a post in WordPress via AJAX
- How to load some jquery code to make validation in the theme customizer?
- If is multiple page templates
- Woocommerce checkout field maxlength, make input number field only (postcode)
- Load JS Script only for custom post types
- Get Current User info using wp_localize_script, in functions.php
- Problem in loading javascript in footer
- How to get the post_name when in preview?
- How to load jQuery in the footer – nothing works for me
- Allow Post Author to be 0 on Update
- Trouble with adding a wp_enqueue_script on wordpress
- WP Ajax Function Always Returning undefined
- Overwriting the menu break points of twentysixteen in child theme
- How do I remove the date and category form my portfolio pages
- using jQuery on only one page
- Can’t call Javascript function – scope?
- Changing parent element’s class or style
- Adding jQuery datepicker to Custom Post Type Metabox [closed]
- Plugin Scripts no loading on options page
- Why does get_template_directory_uri() not include “www”, only for enqueued stylesheets?
- Add php code to wp_print_scripts?
- How can i unload effect.min.js file?
- WordPress can’t get jquery/unslider to work
- Using WP functions inside javascript
- Dequeue scripts in IE7 only using functions.php
- Why I can’t load my JavaScripts using an hook inside my functions.php file?
- Add custom taxonomy using JS in post editor
- Advanced method to control cache of enqueued style/script
- Display Script in Header When URL Variable Present
- Populate Product Regular Price with a calculated ACF Field Value
- What is the earliest Hook a Script can use?
- WordPress does not load jQuery
- post value to function with Ajax and jQuery
- How to make JQuery load on top of head tag before everything
- Help wiht adding fullcalendar.io to a WordPress page
- WP Enqueue Script Error
- How do I dequeue a Stylesheet, stored in an ‘Assets’ folder?
- I need to ‘wp_dequeue_script’ and ‘styles’ and ADD a bunch of other css and js
- Load scripts into an AJAX div
- Load scripts into an AJAX div
- JavaScript code do not works on online server
- Why is style.css not loading through the functions.php
- Javascript and Stylesheet in child page
- Search and Replace Script Loader in Head Only Works in Footer
- using enqueue_script in a shortcode isn’t working
- wp_enqueue_scripts called twice?
- How to Run a jQuery Script after a Javascript Script has Finished in WordPress
- Having problems loading Jquery in functions.php
- Uncaught ReferenceError: tippy is not defined
- Can’t find function which is called in a wordpress theme
- Loading newest dependency javascript module file in functions.php