ThemeShaper Forums » Thematic


How to add jQuery?

(7 posts)
  • Started 8 years ago by Biofobico
  • Latest reply from Biofobico
  • This topic is resolved


  1. Biofobico

    I'm new to wordpress hence my noob question. How can i add jQuery library to Thematic?
    On static sites i create a folder and put my jquery library inside along with a custom.js file with the javascript implementations and then called it in the <head> of the site after the css.

    Whats the best practices to do this with wordpress and thematic?

    And sorry for the really noob question.

    Posted 8 years ago #
  2. jQuery and many other JS libraries are included with WordPress and the Thematic theme has included jQuery in the head already.

    For more info:

    Look here also:

    For more discussions:


    Posted 8 years ago #
  3. Biofobico

    Thanks Gene. Problem solved :)

    Posted 8 years ago #
  4. Hi,

    let me add one snippet that I use in all of my child themes to add jQuery and to clean up behind some 'stupid' plugins ;)

    function re_init_jQuery() {
    	if (!is_admin()) {
    		wp_register_script('jquery', '');
    add_action('init', 're_init_jQuery');


    Posted 8 years ago #
  5. Biofobico

    Sorry about the dumb question Chris, but whats the purpose of that code snippet?

    Posted 8 years ago #
  6. Hi,

    this code snippet is used for WordPress 2.9.x. It'll exchange the standard jQuery version and all versions registered by strange plugins against a newer one, but only for the frontend. jQuery 1.4.2 is causing some glitches in the WP backend.

    Just in case that you need jQuery only on certain pages or for certain templates, you can wrap the wp_register_script into additional if-clauses. This will reduce the load time for your blog.


    Posted 8 years ago #
  7. Biofobico

    Thanks for the clarification Chris.

    Posted 8 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.