Overview

Use this tool to create custom code for Script Registration with wp_register_script() function.

Usage

  • Fill in the user-friendly form.
  • Click the “Update Code” button.
  • Copy the code to your project.
  • Or save it as a snippet and share with the community.

Examples

If you are still learning how to use this tool, check out the following examples:

The function used in the code.
Where to enqueue? Front end, login or admin.
Name used in the code as a script handle. URL to the script.
Commas separated list of script handles to load before this script. Script version number.
Load the script in the header (wp_head hook) or the footer (wp_footer hook).
Deregister the script first. Enqueue the script.
Name used in the code as a script handle. URL to the script.
Commas separated list of script handles to load before this script. Script version number.
Load the script in the header (wp_head hook) or the footer (wp_footer hook).
Deregister the script first. Enqueue the script.
Name used in the code as a script handle. URL to the script.
Commas separated list of script handles to load before this script. Script version number.
Load the script in the header (wp_head hook) or the footer (wp_footer hook).
Deregister the script first. Enqueue the script.

  Save Snippet
// Register Script
function custom_scripts() {

}

// Hook into the 'wp_enqueue_scripts' action
add_action( 'wp_enqueue_scripts', 'custom_scripts' );