[Resolved] Flexslider scripts

Home Forums Support [Resolved] Flexslider scripts

Home Forums Support Flexslider scripts

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #80433
    Jean Paiva
    Developer

    Hey Tom, first of all congratulations on 150k downloads!

    I’m need to call the flexslider script in my child theme. So far I’ve enqueued the script, but when loaded is heading to GP parent folder. Here’s my code:

    function acmmb_flexslider_scripts(){
    	//you enqueue the script
    	wp_enqueue_script( 'acmmb_flexslider', get_template_directory_uri() . '/js/jquery.flexslider-min.js', array('jquery'), GENERATE_VERSION, true );
    }
    add_action( 'wp_enqueue_scripts', 'acmmb_flexslider_scripts' );

    How can I load the file in my child theme jf folder? Do I need to register first?

    #80435
    Jean Paiva
    Developer

    I made it! I’ve changed
    get_template_directory_uri() for get_stylesheet_directory_uri()

    Codex:
    http://codex.wordpress.org/Function_Reference/get_stylesheet_directory_uri

    #80560
    Tom
    Lead Developer
    Lead Developer

    Thanks! Can’t believe we’re at 150k already 🙂

    That’s perfect – glad you found the solution!

    get_template_directory_uri() returns the parent theme folder URL, where get_stylesheet_directory_uri() returns the folder of the stylesheet (the child theme, if activated).

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.