Problem with js enqueue in WordPress multisite
-
Hi
Im trying to enqueue a couple of js files in a wordpress multisite environment. I copied the code from a single site where it worked perfectly, but now it seems that WordPress isnt loading these scripts at all. What could be the problem, any ideas?
The js files are in a child theme and the child theme is activated on the site im working on.
thanks
function wpb_adding_scripts() { wp_register_script('lightslider-script', get_stylesheet_directory_uri() . '/js/lightslider.js', array('jquery'),'1.1', true); wp_enqueue_script('lightslider-script'); wp_register_script('lightgallery-script', get_stylesheet_directory_uri() . '/js/lightgallery-all.js', array('jquery'),'1.1', true); wp_enqueue_script('lightgallery-script'); wp_register_script('ls-script', get_stylesheet_directory_uri() . '/js/ls.js', array('jquery'),'1.1', true); wp_enqueue_script('ls-script'); } add_action( 'wp_enqueue_scripts', 'wpb_adding_scripts' );
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Problem with js enqueue in WordPress multisite’ is closed to new replies.