Skip to content

Instantly share code, notes, and snippets.

@henshaw
Created October 10, 2024 02:27
Show Gist options
  • Select an option

  • Save henshaw/34be944da45c91671459dbd46caeb2ae to your computer and use it in GitHub Desktop.

Select an option

Save henshaw/34be944da45c91671459dbd46caeb2ae to your computer and use it in GitHub Desktop.
This code, which goes in functions.php, forces WordPress to put jQuery links within the header.
function insert_jquery(){
wp_enqueue_script('jquery', false, array(), false, false);
}
add_filter('wp_enqueue_scripts','insert_jquery',1);
@henshaw

henshaw commented Oct 10, 2024

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment