Forums

[resolved] I want to disable jquery included in WordPress. (10 posts)

  1. supergab
    Member
    Posted 3 years ago #

    Hi,

    Is there a way to make sure that the jquery included in WordPress won't load with the wp_head because it's conflicting with other jquery plugins?

    For now I renamed the jquery folder in wp-include but I don't think it's the best solution.

    Many thanks for your time and help.

  2. Mark / t31os
    Moderator
    Posted 3 years ago #

    If a plugin conflicts with the WordPress Jquery then inform the author so they can fix their Jquery...

    A correctly written plugin will not have that problem...

    EDIT/UPDATE for future readers: WordPress 3.0 will include 1.4.2, de-registering and adding your own is just totally pointless(seeing as that's current).

  3. batten1000
    Member
    Posted 2 years ago #

    I want to disable wordpress jquery as well. I prefer to do the google.load() method.

    How does one do this? Very little info out there on how to disable. Only how to enqueue script.

    Thanks

  4. Otto
    Tech Ninja
    Posted 2 years ago #

    @batten1000:
    There's a plugin for this that does it for you:
    http://wordpress.org/extend/plugins/use-google-libraries/

    It replaces the existing library calls in WP with the Google links, so that the enqueue stuff makes it come from Google.

    You *cannot* disable the built in jQuery. Not really. Doing so breaks large portions of the admin screens. WordPress has this script stuff for a reason, it's wise to use it.

  5. batten1000
    Member
    Posted 2 years ago #

    drat. ok thanks otto

  6. bazil749
    Member
    Posted 2 years ago #

    @batten1000, @otto42
    Actually, that's not entirely true.

    This has always worked for me:

    // Drop this in functions.php or your theme
    if( !is_admin()){
    	wp_deregister_script('jquery');
    	wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"), false, '1.3.2');
    	wp_enqueue_script('jquery');
    }

    You can skip the "register" and "enqueue" steps above and use the literal google.load() in your theme, but that may mess with certain other plugins that need jQuery registered through WordPress.

  7. batten1000
    Member
    Posted 2 years ago #

    thanks bazil i will give it a try.

  8. nan
    Member
    Posted 2 years ago #

    Thanks bazil749 ! It's works ...

  9. jsruok
    Member
    Posted 2 years ago #

    Cheers, bazil!

  10. Nutrawee
    Member
    Posted 2 years ago #

    Thanks bazil749.

Topic Closed

This topic has been closed to new replies.

About this Topic