All of these scripts are already registered to print in the footer. See wp-includes/script-loader.php
for details. When you try to register the scripts again WordPress doesn’t change that.
The workaround would be to register a new script for wp_head
with those scripts as dependencies (the third parameter of wp_enqueue_script()
).
Do not register the scripts in another order before WP does it! This will affect wp-admin
and probably other pages too.
But the real question is: Why do you need the scripts loaded so early? Fix that instead. My guess: You are using some inline script and don’t wait until the document is loaded. That is hardly ever necessary.
Also note that $
is not a jQuery object in WordPress.
You have to use jQuery( function( $ ) { /* your code with $ here. */ }
.
Related Posts:
- AJAX Contact Form Issue
- jQuery UI inside widget on admin page
- Access Customizer widget instance form
- Widget Admin page and Javascript enqueuing
- Executing Javascript When a Widget is Added in the Backend
- Loading scripts only if a particular shortcode or widget is present
- How to include jQuery and JavaScript files correctly?
- How to load Widget javascript + css files only if used?
- How can I use the built in WordPress “browse link” functionality?
- force enqueue script to be first in order of prominence
- How to dequeue a script?
- Enabling jquery when dragging available widget to sidebar area
- Move WordPress native javascript to bottom of page?
- How to refresh Theme Customizer after change color inside wpColorPicker?
- RequireJS in custom theme. Working Example
- jQuery in header or footer
- How do I rebind event after widget save
- How to get a jQuery script to run on a page?
- How to listen to color changes on the color picker?
- Ban certain widgets from certain sidebars
- Including javascript for a shortcode
- Asynchronous Javascript Loaders
- Widget “Save” resetting jQuery hidden fields
- jQuery does not work in widget backend
- Use js script from one plugin in another plugin
- wp_enqueuescript won’t load in footer even with true value set?
- Trigger Submit Event when Widget is added to Sidebar
- iris color picker in widget – click event doesn’t fire when initially when widget is first created
- How wp_enqueue_script works?
- Enqueuing Script in functions.php vs on the page
- Elegantly using JavaScript on widget admin forms
- How do I get my page to load the jQuery UI Effects library?
- Script won’t execute in the media manager
- How to enable “shift-click to edit this widget” functionality on a custom widget?
- How to properly add Bootstrap and JQuery Javascripts?
- Using jQuery in widget development
- Is it possible to enqueue a script from a widget method (of extended WP_Widget object)?
- cannot drag and drop widgets since wordpress 3.2.1
- Including Javascript options
- Run JS after widget settings are saved?
- Widget code is not working on WordPress.com Hosted Blogs
- Enqueuing javascript files
- Include chat (HTML, js, css) in all pages of WordPress
- How to determine the number of widgets contained in a sidebar via customizer JS
- Problem in loading javascript in footer
- jQuery not available to other scripts
- Wrap the widget content with a div and get the widget title outside? [closed]
- Enqueue script/style if certain widget has certain value
- List of JS Events for Widgets?
- how to en-queue jQuery to load before the tag
- How do I pass the id of my widget to javascript in the form function?
- Searching multiple tags and adding jQuery dependant script onto page template?
- How i can widget ID get after drag for wordpress with jquery?
- should i be checking for jquery before enqueing it in a plugin
- Plugin Scripts no loading on options page
- Unable to load “wpColorPicker” on theme customize page
- wordpress widget missing jquery
- 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
- Run a jquery script on on a certain template page
- Enqueue script only when side widget is used
- How to load jQuery in TOP of wp_footer?
- Making jQuery .change() event persistent after widget save
- Include Jquery libraries in wordpress theme?
- Using WP functions inside javascript
- Including Older Version of jQuery for IE7/IE8
- How To Include JavaScript Files Only In Single Posts?
- Jquery checkbox -show posts with checked tags
- How to load Javascript code or functions.php later in a child theme?
- “The editor has encountered an unexpected error” After add defer tag to java script
- How to pass data to javascript in custom widget class
- How to make JQuery load on top of head tag before everything
- Add a Script button in W3 Total Cache plugin not working due to conflicting jQuery version
- Render repeatable widget fields properly with Backbone.js
- JavaScript code do not works on online server
- Widget outputting JS as plain text
- Simple SCript Not Displayed in WIdth
- Bootstrap with separate js File
- Loading scripts only if a particular shortcode or widget is present
- Slider from different widgets
- How to add JS snippet before closing tag?
- Enqueue javascript that inserts custom php widget into jQuery-constructed div
- WordPress Javascript Widget jQuery Dependency Issue
- Using AJAX in WordPress Widget
- List.js inside WordPress widget
- Custom tabs widget don’t work in google chrome, is blocked, do not change the tabs. Why?
- Multiple widgets in wordpress
- How to Run a jQuery Script after a Javascript Script has Finished in WordPress
- Add text to Text Widget using Javascript
- jQuery “on” handler does not fire on newly inserted widgets [closed]
- javascript not loading in wordpress
- Theme now uses require.js and enqueue script no longer works
- bootstrap-slider.js by seiyria not working in wordpress
- Using AJAX in a Widget to Sort items [closed]
- Widget won’t work due to old JavaScript? Any ideas how to make it work? [closed]
- Uncaught ReferenceError: tippy is not defined
- Why do none of my widgets have a title?
- How to paste widget to a specific page
- An archive widget, coming from nowhere on my posts and pages
- Can I use wp_widget_rss_output to show my site’s feed in the dashboard?