Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 140705

Wordpress: javascript not loading after enqueuing in function.php

$
0
0

Recently i m transfering my site to wordpress and while doing it i m enqueuing javascripts in my wordpress footer through function,php but it not loading in browser .

my function.php codes :

function NewBiz_scripts() {

    wp_enqueue_style( 'style', get_stylesheet_uri() );
    wp_enqueue_script( 'script', get_template_directory_uri() . '/js/main.js', array ('jquery'), NULL ,true);
    wp_enqueue_style( 'animate',get_template_directory_uri() . '/lib/animate/animate.css' );
    wp_enqueue_style( 'animate-min',get_template_directory_uri() . '/lib/animate/animate.min.css' );
    wp_enqueue_style( 'bootstrap',get_template_directory_uri() . '/lib/bootstrap/css/bootstrap.css' );
    wp_enqueue_style( 'bootstrap.min',get_template_directory_uri() . '/lib/bootstrap/css/bootstrap.min.css' );
    wp_enqueue_script('bootstrap-js-bundle' . get_template_directory_uri() . '/lib/bootstrap/js/bootstrap.bundle.min.js',array(),NULL,true);
    wp_enqueue_script('bootstrap-js-min' . get_stylesheet_uri() . '/lib/bootstrap/js/bootstrap.min.js',NULL,true);
    wp_enqueue_script('counterup' . get_template_directory_uri() . '/lib/counterup/counterup.js', NULL, NULL ,true);
    wp_enqueue_script('easing' . get_template_directory_uri() . '/lib/easing/easing.js', NULL, NULL ,true);
    wp_enqueue_script('easing.min' . get_template_directory_uri() . '/lib/easing/easing.min.js' , NULL,NULL , true);
    wp_enqueue_style ('font-awesome' . get_template_directory_uri() . '/lib/font-awesome/css/font-awesome.css');
    wp_enqueue_style ('font-awesome.min'. get_template_directory_uri() . '/lib/font-awesome/css/font-awesome.min.css');
    wp_enqueue_style ('ionicons' . get_template_directory_uri() . '/lib/ionicons/css/ionicons.css');
    wp_enqueue_style ('ionicons.min' . get_template_directory_uri() . '/lib/ionicons/css/ionicons.min.css');
    wp_enqueue_script('mobile-nav' . get_template_directory_uri () . '/lib/mobile-nav/mobile-nav.js',NULL, NULL , true);
    wp_enqueue_script('jquery' . get_template_directory_uri() . '/lib/jquery/jquery.min.js',array () ,NULL ,NULL ,true );
    wp_enqueue_script('jquery_migrate' . get_template_directory_uri() . '/lib/jquery/jquery-migrate.min.js',array() ,NULL ,NULL ,true );



}   

add_action( 'wp_enqueue_scripts', 'NewBiz_scripts' );
?>

<?php
$theme_name_images = get_bloginfo('stylesheet_directory') . '/img/';
?>

only main.js is loading rest not loading .

screenshot DOM

please some one can help me to figure out what i m doing wrong i new to wordpress. thankyou.


Viewing all articles
Browse latest Browse all 140705

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>