Not the best way but removing the default WordPress actions that allow any scripts in the document’s head can help:
function md_footer_enqueue_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_enqueue_scripts', 'md_footer_enqueue_scripts');`
Related Posts:
- Correct Method to run scripts with dependencies without enqueue?
- Adding jQuery dependency prevents my script from enqueuing/loading
- Using multiple versions of jQuery while still calling it like WP likes
- Why isn’t jQuery 2.1 loading in the header?
- Move jQuery to the bottom of the page whilst keeping the WordPress jQuery
- WordPress error when replacing local jQuery by externally-hosted
- jQuery plugin not loading
- JS plugin script loading but not working
- Need help with adding jQuery script to WP and calling script to page
- Enqueue core jQuery in the footer?
- How to correctly include jquery-ui effects on wordpress
- How do I make script load after jquery?
- Concatenate and minify dependencies for enqueued JavaScript files
- Make jQuery library load before plugin files
- How to control what jQuery version to include, with wp_enqueue_script
- Adding jquery and thickbox to WordPress theme
- Move WordPress native javascript to bottom of page?
- Best Practices for Seperating jQuery from HTML/PHP
- RequireJS in custom theme. Working Example
- How to get a jQuery script to run on a page?
- Add `datetimepicker` to form
- Deregister WordPress jquery on specific page
- Moving jQuery to the footer without using de-register in WordPress
- Including javascript for a shortcode
- Asynchronous Javascript Loaders
- Best Way to Include Scripts on a Specific Template Page
- Use js script from one plugin in another plugin
- wp_enqueue_script won’t load in header?
- wp_enqueue_script and wp_register_script in theme not working
- wp_enqueuescript won’t load in footer even with true value set?
- How wp_enqueue_script works?
- Enqueue jQuery in WordPress
- How do I get my page to load the jQuery UI Effects library?
- jQuery on Underscores menu
- Script won’t execute in the media manager
- When does WordPress automatically enqueue jQuery?
- wp_ajax() question.. not using wp_enqueue_script?
- enqueue the scripts
- Enqueuing javascript files
- WordPress loads Jquery Automatically – is my idea correct to add it to the footer?
- enqueued script with jquery dependency not getting jquery
- How to undo deregister script and use local versions?
- Best way to include jQuery and fire with script at bottom of container
- Is it necessary to enqueue jquery?
- WordPress Ajax problem with undefined url
- Enqueue WordPress jQuery after it’s been deregistered by a plugin
- Not sure if enqueuing js scripts properly
- WordPress jquery files not being enqueued
- Searching multiple tags and adding jQuery dependant script onto page template?
- Why does javascript works only if logged in?
- Jquery function working in Dev Console but not otherwise [duplicate]
- Enque Javascript in Footer?
- Plugins loading multiple copies of JQuery
- Why is my WordPress loading old version of JQuery?
- Cannot enqueue jQuery correctly using Google CDN
- Yoast SEO breaking media upload
- $.browser Undefined Seemingly Causing Faulty Page Display
- Unexpected script loading order
- Problem getting .js file to load via a plugin
- Using jquery-1.7.2.min.js instead of the wordpress jquery
- How register library to use jquery correct
- Why should I deregister jquery?
- Plugin Scripts no loading on options page
- How to enque js script in footer that are not in .js file?
- Loading scripts on a single page plants the script in the footer
- registering new jQuery after wp_deregister_script() not working
- Run JS function when JQ enqueued
- jQuery will not work on page from snippet or file
- Can’t delete the default jQuery in the theme
- Enqueue script: link not working in page source
- jQuery is not defined, working on local server but not online
- Including Older Version of jQuery for IE7/IE8
- How To Include JavaScript Files Only In Single Posts?
- wp_enqueue_script jquery and jquery ui not working
- wp_enqueue_script calling jQuery at different times for different browsers?
- Bootstrap and jQuery error: $ is not defined
- Fire action after enqueue script
- WordPress not showing jQuery
- Get with jQuery the value of an ACF field
- How to make JQuery load on top of head tag before everything
- Uncaught ReferenceError: jQuery is not defined
- jQuery Plugin Uncaught TypeError: jQuery(…).slider is not a function
- JavaScript code do not works on online server
- Bootstrap with separate js File
- How to add JS snippet before closing tag?
- Can’t seem to get JQuery working (wordpress plugin)
- Enqueue javascript that inserts custom php widget into jQuery-constructed div
- Ajax Request with jQuery not happening
- jQuery does not appear to be enqueued on static homepage
- Scripts only working on home page
- Uncaught TypeError: Object [object Object] has no method ‘dialog’
- How to make jQuery load AFTER plugin’s script?
- Monarch JS has not been loaded. After changing the $dep parameter, it start being loaded
- Can’t get jQuery to enqueue into post edit script
- javascript not loading in wordpress
- jQuery issue and wp_enqueue_script
- Using WP Ajax and jQuery to process multiple forms on the same page?
- How to enqueue script before jQuery? [duplicate]
- javascript and css not loading properly in WordPress site
- Making the Google Maps API non readable