ThemeShaper Forums » Thematic

[closed]

blank thematic installation - how to kick out the jQuery?

(5 posts)
  • Started 9 years ago by Aaron
  • Latest reply from flick
  • This topic is not resolved
  1. Hi all! I just set up a fresh wordpress installation with a fresh thematic childtheme to my fingertips.

    First thing I want to do is: remove all scripts and libraries that are loaded by default to start over with my scripting experiments.

    So I did a simple

    function remove_head_scripts() {
    	remove_action('wp_head', 'thematic_head_scripts');
    }
    add_action('init', 'remove_head_scripts');

    And all script in the head are gone - except one line!
    <script type='text/javascript' src='http://vicklund.xtreemhost.com/wordpress/wp-includes/js/jquery/jquery.js?ver=1.3.2'></script>

    I searched in all places but found just nothing - please help!

    Posted 9 years ago #
  2. kylehotchkiss
    Member

    Are you sure it's not a plugin doing it?

    wp_dequeue_script('jquery');

    Posted 9 years ago #
  3. @Aaron: The official Thematic Guide has this code for removing jQuery:

    // Filter away the default scripts loaded with Thematic
    function childtheme_head_scripts() {
     // Abscence makes the heart grow fonder
    }
    add_filter('thematic_head_scripts','childtheme_head_scripts');
    Posted 9 years ago #
  4. Hey Kyle and Flick, thanks for your response!

    wp_dequeue_script() used in thematic's functions.php leads to an error, but wp_deregister_script() does the job like Chris shows it here: http://forums.themeshaper.com/topic/jquery-compatibility#post-2404

    Fine for now. But I would really like to know where jQuery is called in thematic. I feel like I'm not in full control of my theme.

    Apart from thematic_head_scripts() there is literally no file in thematic that deals with any jQuery or enqueue scripts.

    It's no plugin for sure, there are no plugins installed yet - with standard wordpress theme activated no jQuery is loaded.

    Well it works and I'm glad but there remains a subtle "where the heck does that come from...?"

    Posted 9 years ago #
  5. @Aaron: Thanks for sharing your solution.

    Regarding where jQuery is called, I think it is found on line 28 of functions.php

    // load jQuery
    wp_enqueue_script('jquery');
    Posted 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.