WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

<?php wp_head(); ?> from my default wp theme generates

<script type='text/javascript' src='http://example.com/wp-includes/js/comment-reply.min.js?ver=3.5.1'></script>
<script type='text/javascript' src='http://example.com/wp-includes/js/jquery/jquery.js?ver=1.8.3'></script>

The question is... What is generating those two lines and how can i edit that code?

share|improve this question
Can you explain why you want to edit that code? These scripts are core scripts, enqueued by WordPress itself. – EAMann Feb 2 '13 at 2:01
Hi @EAMann! I simply want to change the filepath; removing wp-includes , ?ver=3.5.1 / ?ver=1.8.3 and add google's hosted jquery with local fallback. The problem is that i didn't found anything that make reference to that piece of code. – m3tsys Feb 2 '13 at 2:10
up vote 1 down vote accepted

To disable comment-reply go to Discussion Settings and disable Threaded (nested) comments.

Google-hosted jQuery:

function my_scripts() {

        'jquery', // name
        '//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js', // google hosted, protocol-independent
        array(), // dependencies (empty)
        NULL, // removes version
        true // load in footer, 'false' for header

add_action('wp_enqueue_scripts', 'my_scripts');
share|improve this answer
Thank you. This worked (with a minor edit) :) – m3tsys Feb 2 '13 at 12:33

Those lines are inserted by functions hooked to wp_enqueue_scripts as in this example from the Codex:

function my_scripts_method() {
add_action('wp_enqueue_scripts', 'my_scripts_method');

The scripts themselves were registered and/or enqueued with wp_register_script or wp_enqueue_script.

You can deregister or dequeue script with wp_deregister_script or wp_dequeueu_script

In your case:


But this is a good way to break things. I would not deregister or dequeue core scripts unless I were personally managing a site and would continue to do so for the foreseeable future.

Use Google Libraries should load scripts form Google's servers in little bit safer way that just loading your own local copies.

share|improve this answer
I added that code to functions.php but it doesn't work. – m3tsys Feb 2 '13 at 11:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.