You’ll want to enqueue the script in your functions.php (If this is in a plugin, you could do a little differently). Here’s a sample:
function owl_scripts()
{
wp_enqueue_script( 'owl-carousel', get_stylesheet_directory_uri() . 'js/carousel.js', array( 'jquery' ), '', true );
wp_enqueue_style( 'owl-style-min', get_stylesheet_directory_uri() . 'css/carousel.css' );
}
add_action( 'wp_enqueue_scripts', 'owl_scripts' );
This is assuming:
- You’re using a child theme.
- You put the carousel.js in the directory ‘your-child-theme/js’.
- You put the carousel.css in the directory ‘your-child-theme/css’.