Use dedicated functions

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:

  1. You’re using a child theme.
  2. You put the carousel.js in the directory ‘your-child-theme/js’.
  3. You put the carousel.css in the directory ‘your-child-theme/css’.

tech