• Resolved teejaaygee

    (@teejaaygee)


    Hello all,

    First time posting, and new to the community. ??

    I am learning about enqueuing multiple css stylesheets, and am currently attempting to enqueue animate.css to my WP theme.

    I have placed the following into my functions.php

    wp_enqueue_style( 'animate', get_template_directory_uri() .'css/animate.css', array(), null, 'all' );

    I cannot tell if I have enqueued the stylesheet correctly and am not sure how to verify this through WP.

    Can anyone help?

    Thanking you in advance,

    Tim

    • This topic was modified 7 years, 8 months ago by teejaaygee.
Viewing 3 replies - 1 through 3 (of 3 total)
  • One strategy would be to right click on your site and select “View Source” after you’ve enqueued your style and see if it’s listed.

    Moderator bcworkz

    (@bcworkz)

    You need to call wp_enqueue_script() from within a callback to one of the hooks mentioned here. Similar to examples in some of the user notes on the same page. The first user note was mine, it is not a callback example.

    Once you’ve correctly enqueued, then as allisonplus indicated, be sure you got the paths correct, they are surprisingly easy to get wrong. If your script has any dependencies, you need to specify them in your wp_enqueue_script() call. But also verify the dependencies were loaded on the page before your script is loaded.

    Thread Starter teejaaygee

    (@teejaaygee)

    Hey Guys,

    Thank you very much for this. Fantastic responses from the both of you. Makes a lot more sense now. ??

    Regards,

    Tim

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Verifying whether stylesheet is enqueued’ is closed to new replies.