• Resolved rainbowguy

    (@rainbowguy)


    Hi.

    I am new to WP and would like to know how to enqueue following scripts in my functions.php:

           <script src="js/jquery.min.js"></script>

            <script src="js/bootstrap.min.js"></script>

            <script src="js/slick.min.js"></script>

            <script src="js/nouislider.min.js"></script>

            <script src="js/jquery.zoom.min.js"></script>

            <script src="js/main.js"></script>

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator threadi

    (@threadi)

    Most of it is not even necessary to integrate. jQuery comes with WordPress itself. You should also check the other files first to make sure they are not already there.

    What is the goal of all this?

    Moderator threadi

    (@threadi)

    With regard to the handler, I would recommend creating it from the name of your theme and its function (example: electro-slick). Your current code could possibly lead to duplication with other plugins that also call their handlers slick, for example.

    Thread Starter rainbowguy

    (@rainbowguy)

    I see. Thanks for the suggestion.

    So that means the bootstrap import is fine as well then.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘How to enqueue scripts in functions.php’ is closed to new replies.