I checked twenty nineteen theme. Plugin works fine.
The plugin js is not working.
function theme_scripts() {
wp_enqueue_style('theme-owlcarousel','//cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css', array(), '0.1.0', 'all');
wp_enqueue_style('theme-owltheme','//cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.css', array(), '0.1.0', 'all');
wp_enqueue_style('theme-bootstrap','//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css', array(), '0.1.0', 'all');
wp_enqueue_style('theme-fontawesome','//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css', array(), '0.1.0', 'all');
wp_enqueue_style( 'theme-style', get_stylesheet_uri() );
wp_enqueue_script('theme-jquery', '//cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js', array(), null, true);
//wp_enqueue_script( 'wp-editor-customizer', get_template_directory_uri() . 'js/customizer.js', array( 'jquery' ), rand(), true );
wp_enqueue_script('theme-popper', '//cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js', array(), null, true);
wp_enqueue_script('theme-owl', '//cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.js', array(), null, true);
wp_enqueue_script('theme-bootstrap', '//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js', array(), null, true);
wp_enqueue_script( 'theme-main-function', get_template_directory_uri() . '/js/function.js', array(), '20151215', true );
wp_enqueue_script( 'theme-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );
wp_enqueue_script( 'theme-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'theme_scripts' );
I used my scripts like this.
-
This reply was modified 4 years, 11 months ago by rashedbrur.