Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am trying to implement animate.css with my Twenty Twelve child theme. I read this post about trying to implement it (option 1), but it is not working. The only thing I am doing differently is that I have a child theme. Any thoughts? Thanks a lot!

Edit: Milo, you're first answer did not work. This is my code in my child theme's function.php:

function paukai_2011_styles() {
    wp_register_style( 'animate-css',
        get_stylesheet_directory_uri() . 'http://shaansingh.me/wp-content/themes/twenty-twelve-child/animate.min.css',
        array(),
        '20120725',
        'screen' );
    wp_enqueue_style( 'animate-css' );
}

And here is my html:

<p class="animated wobble">This is dummy text</p>

No luck unfortunately.

share|improve this question
    
Define "not working" ? Do you see stylesheet properly appearing in page source? What is (not) happening? –  Rarst Jun 15 '13 at 22:17
    
The animation is not appearing. –  Shaan Singh Jun 17 '13 at 16:10
add comment

1 Answer

up vote 0 down vote accepted

The example in the page you linked uses get_template_directory_uri(), which will only give you the parent theme URI. If you want to target something in a child theme, you have to swap that for get_stylesheet_directory_uri(), which will give you the child theme URI, in the event a child theme is being used.

share|improve this answer
    
I was linking to the .css file in the parent theme (I had put it there), but I will try this. –  Shaan Singh Jun 17 '13 at 16:14
    
See my original post for the response to your answer. –  Shaan Singh Jun 17 '13 at 16:26
    
you're prepending get_stylesheet_directory_uri to a full path, it should just be get_stylesheet_directory_uri() . '/animate.min.css' if it's in the root of your child theme directory. –  Milo Jun 17 '13 at 16:30
    
It worked. Thanks so much! –  Shaan Singh Jun 17 '13 at 20:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.