In a theme I am working on, the comments form (mostly sure they are both comments form) adds javascript to the header.

<script type='text/javascript' src='http://[URL]wp-includes/js/l10n.js?ver=20101110'></script>
<script type='text/javascript' src='http://[URL]/wp-includes/js/comment-reply.js?ver=20090102'></script>

When I disable javascript I can still add comments and the comment form still works. So I wish to remove these from my header.

I cannot find any documentation on how to do so, so How can I remove these?

  • 1
    If you remove those, you'll break the comment reply links from moving the comment form around on the page to handle threaded comments properly.
    – Otto
    Dec 9, 2011 at 21:45

1 Answer 1


You could remove scripts in the following manner.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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