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
- How to include jQuery and JavaScript files correctly?
- How to load scripts/styles specific for a page
- WordPress Enqueue for homepage only, functions.php, wp-framework
- force enqueue script to be first in order of prominence
- How to dequeue a script?
- Where and how to put inline js in pages
- Move WordPress native javascript to bottom of page?
- RequireJS in custom theme. Working Example
- deregister scripts on certain page
- Does WordPress Development Mode Exist (with not minified JS)?
- jQuery in header or footer
- Enqueue Script with data attributes
- How to get a jQuery script to run on a page?
- AJAX handler throws 400 (Bad request) – why?
- ajax live search for post title
- How to enqueue every script in a folder automatically?
- Replacing select2 in admin backend for all selects
- Including javascript for a shortcode
- Most elegant way to enqueue scripts in function.php with foreach loop
- Asynchronous Javascript Loaders
- Adding a jQuery rotator function
- How to add JS snippet before closing tag?
- wp_enqueue_script only works outside of action
- Enqueue javascript that inserts custom php widget into jQuery-constructed div
- jQuery HoverIntent is not a function
- How to use different jquery function of idangero swiper dependant on page template?
- Exclude javascript in certain page url and all following url’s after forward slash
- using enqueue_script in a shortcode isn’t working
- Using array page name together with page id to deregister script
- enqueue script if page is not equal to
- Ajax call does not work for this custom code
- 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
- Why wp_ajax hooks doesn’t work?
- Remove snippets of JS from core
- Why my wp_enqueue_script doesnt work on some page?
- javascript not loading in wordpress
- Theme now uses require.js and enqueue script no longer works
- new to javascript – using in instead of functions.php, not loading correctly
- Owl Carousel and WordPress Integration Via WP_Enqueue
- bootstrap-slider.js by seiyria not working in wordpress
- AJAX values converted to PHP Variables?
- How to hide .js files on wordpress website using php or wp plugins or any? [closed]
- comment_post function with js not running
- Uncaught ReferenceError: tippy is not defined
- Get all users from role and add to dropdown (select) – wordpress, javascript
- Can’t find function which is called in a wordpress theme
- WordPress – Notice: Function wp_enqueue_script was called incorrectly
- Auto updating JavaScript dependancy in functions.php
- Loading newest dependency javascript module file in functions.php
- WordPress enque the same script causes the setInterval not to work
- wp_script_add_data not working
- How to use webpack in WordPress theme? I want some scripts to load in the footer, some in the header and some with script parameters
- I got this error POST https://localhost/meraboilerwp/[object%20Object] 404 (Not Found)
- Why is my JS not working on initial load?
- Second featured image only shows in metabox preview after saving a post in the wordpress editor
- Help with adding fullcalendar.io to a WordPress page
- Function to filter numbers from string