• Hello,

    I have an issue about how do I get my scripts and css from a Jquery plugin that I would activate on a child theme’s page. I used get_stylesheet_directory_uri() function with wp_enqueue functions as the codex tells to do but I still have 404 errors and wrong paths in my chrome inspector despite the fact that get_stylesheet_directory_uri() is returning the right string. I don’t get what is wrong in my code. If someone knows about similar issues, I would be saved.

    Here is my code that I used on my child theme’s template page :

    function references_scripts() {
    		wp_enqueue_style( 'styles', get_stylesheet_directory_uri().'/stylesheets/styles.css' );
    		wp_enqueue_script( 'jquery', get_stylesheet_directory_uri().'/js/jquery.quicksand.js', array(), '1.0.0', true );
    		wp_enqueue_script( 'jquery', get_stylesheet_directory_uri().'/js/sorting.js', array(), '1.0.0', true );
    	}
    
    	add_action( 'wp_enqueue_scripts', 'references_scripts' );

The topic ‘Loading scripts in child theme’ is closed to new replies.