Give help. Get help.

  • # August 20, 2009 at 1:44 pm

    Hi everyone,

    I was just curious on the method of bringing in jQuery into WP themes.

    When you use <?php wp_enqueue_script("jquery"); ?> before <?php wp_head(); ?>, are you pretty much calling any .js file that is sitting in the directory, or does it just load the basic default functions that come with jQuery’s library?

    In other words, when I use enqueue, and I’m using a custom jQuery script, do I have to manually load that in addition to enqueue? Or is that included in the enqueue process and I just drop the custom .js file into the WP directory that contains the jQuery scripts?

    # August 20, 2009 at 11:02 pm

    You don’t need to do anything else. Those two calls will load jQuery on your page, and indeed is the correct way to do it. WordPress ships with a copy of jQuery, and that’s what it will load.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.