wordpress - javascript not loading on all pages -


my javascript file etheme.js not loading on pages. i'm running on newest version of wordpress , theme. theme-functions file code provided bellow. i've reuploaded backup , still issue.

            if(!function_exists('etheme_enqueue_styles')) {             function etheme_enqueue_styles() {             global $etheme_responsive;              $custom_css = etheme_get_option('custom_css');              if ( !is_admin() ) {wp_enqueue_style("fa",get_template_directory_uri().'/css/font-awesome.min.css');             wp_enqueue_style("bootstrap",get_template_directory_uri().'/css/bootstrap.min.css');             wp_enqueue_style("parent-style",get_template_directory_uri().'/style.css');             if($etheme_responsive)             wp_enqueue_style("responsive",get_template_directory_uri().'/css/responsive.css');               wp_enqueue_style("font-open-sans",et_http()."fonts.googleapis.com/css?family=open+sans:300,400,700,300italic");             wp_enqueue_style("font-roboto",et_http()."fonts.googleapis.com/css?family=roboto:400,500,700,300&subset=latin,cyrillic-ext");             wp_enqueue_style('js_composer_front');              if($custom_css) {             wp_enqueue_style("custom",get_template_directory_uri().'/custom.css');}              $etheme_color_version = etheme_get_option('main_color_scheme');              if($etheme_color_version=='dark') {             wp_enqueue_style("dark",get_template_directory_uri().'/css/dark.css');}              $script_depends = array();             if(class_exists('woocommerce')) {             $script_depends = array('wc-add-to-cart-variation');}              wp_enqueue_script('jquery');             wp_enqueue_script('modernizr', get_template_directory_uri().'/js/modernizr.js');             wp_enqueue_script('head', get_template_directory_uri().'/js/head.js');             if(class_exists('woocommerce') && is_product())             wp_enqueue_script('zoom', get_template_directory_uri().'/js/zoom.js',array(),false,true);             wp_enqueue_script('etheme', get_template_directory_uri().'/js/etheme.js',$script_depends,false,true);             wp_localize_script( 'etheme', 'myajax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'noresults' => __('no results found!', etheme_domain)));}}}              add_action( 'wp_enqueue_scripts', 'etheme_enqueue_styles', 30); 

try adding html contents:

<script language="javascript" type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script> 

also try alert('i'); see if javascript works.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -