Register WordPress Scripts

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, admin or embed.
Name used in the code as a script handle.
URL to the script.
Comma separated list of scripts to load before this script.
Script version number.
Load the script in the header or the footer.
Deregister the script first.
Enqueue the script.
Name used in the code as a script handle.
URL to the script.
Comma separated list of scripts to load before this script.
Script version number.
Load the script in the header or the footer.
Deregister the script first.
Enqueue the script.
Name used in the code as a script handle.
URL to the script.
Comma separated list of scripts to load before this script.
Script version number.
Load the script in the header or the footer.
Deregister the script first.
Enqueue the script.
Name used in the code as a script handle.
URL to the script.
Comma separated list of scripts to load before this script.
Script version number.
Load the script in the header or the footer.
Deregister the script first.
Enqueue the script.
Name used in the code as a script handle.
URL to the script.
Comma separated list of scripts to load before this script.
Script version number.
Load the script in the header or the footer.
Deregister the script first.
Enqueue the script.
  Save Snippet
// Register Script
function owl_script() {

	wp_register_script( 'owl-carousel', 'js/owl.carousel.min.js', false, false, false );
	wp_enqueue_script( 'owl-carousel' );

}
add_action( 'wp_enqueue_scripts', 'owl_script' );