DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

JQuery is definitely a great Javascript framework, which allow you to, among other things, create stunning visual effects. Including JQuery is easy. But do you know that WordPress can make it even easier?

The first thing you have to know is that WordPress already have JQuery (It is used in the dashboard) so you don’t need to download a new copy of JQuery to your WordPress server.
Then, we just have to use the wp_enqueue_script() function, which automatically enqueue a Javascript file in your theme header.
Open your header.php file and paste the following within the <head> and </head> tags:

<?php wp_enqueue_script("jquery"); ?>

By the way, Cristian just wrote a very interesting post at Cats Who Code. It is all about WordPress Theme Frameworks so be sure to check it out!

Thanks to Chris Coyier for the tip!


  1. before or after wp_head ?

  2. Before wp_head.

  3. Should before wp_head.

Leave a Comment

Your email address will not be published. Required fields are marked *