Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1037173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:49:19+00:00 2026-05-16T14:49:19+00:00

Is there a way to stop WordPress from automatically inserting scripts into my theme

  • 0

Is there a way to stop WordPress from automatically inserting scripts into my theme from wp-includes/js? It’s kind of annoying that I can use/choose to add my own.

Thanks!


Actually it’s not including the jquery but scriptaculous.js and effects.js and for some reason they’re interfering with jquery. Would it be the same just putting:

add_action( 'wp_print_scripts', 'my_deregister_javascript', 100 );

function my_deregister_javascript() {
    wp_deregister_script( 'scriptaculous' );
    wp_deregister_script( 'effects' );
}

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T14:49:19+00:00Added an answer on May 16, 2026 at 2:49 pm

    Most scripts (i.e. jQuery) are queued up by plug-ins that depend on them. Since jQuery ships with WordPress, it makes it really easy to distribute a lean, lightweight plug-in and just call the script from wp-includes/js using wp_enqueue_script('jquery'). In fact, this is the recommended way to include scripts on your site (not sure how you’re using/choosing your own, but that’s a secondary point).

    To remove default scripts, you can use a similar call to: wp_deregister_script('jquery');. This will remove the script named “jquery” from the queue and it will not be included. Here’s the full code you’d place in your functions.php file:

    add_action( 'wp_print_scripts', 'my_deregister_javascript', 100 );
    
    function my_deregister_javascript() {
        wp_deregister_script( 'jquery' );
    }
    

    Keep in mind, though, that some plug-ins might still depend on this script. When you register a script, you typically add any dependencies right in the registration … so if a script depends on jQuery and you’ve removed it like this … then you’ll end up breaking the plug-in because other scripts won’t be included on the page (even if you manually added jQuery through a <script></script> tag on the site.

    To avoid this, you’ll need to use WordPress’ registration/enqueuing engine to re-add your own version of jQuery:

    add_action( 'wp_print_scripts', 'my_deregister_javascript', 100 );
    
    function my_deregister_javascript() {
        wp_deregister_script( 'jquery' );
        wp_enqueue_script( 'jquery', PATH_TO_YOUR_JQUERY_VERSION, '', '1.4.2');
    }
    

    This will re-add jQuery (I assume you’re using version 1.4.2, but replace the version number there with whatever you’re using) and queue it back up in the system. Then any dependencies should be satisfied and everything should work as expected.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to stop the callout from automatically appearing on an embedded
Is there a way to stop Twisted reactor from automatically swallowing exceptions (eg. NameError)?
Is there any way to stop IB in XCode 4 from zooming to try
Is there a way I can stop all processes in a certain directory through
Is there a way to stop Edit>Find in Xcode from searching dynamically as I
Is there any way to stop OpenCL kernel from execution? For example, I launch
Is there a way to stop other subs from running while in a separate
Is there any way to stop PowerShell from removing console message colors when using
Is there any way to stop the execution of a matlab program from the
Is there a way to stop a UISwitch from toggling state when you tap

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.