WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

I am working on a child theme and I want to disable a JavaScript file from the parent folder instead of deleting it.

I have a functions.php file in my child theme folder but don't know how to do it.

In my parent folder I have this file in my js folder: jquery.tipsy.js and I want to ignore it in my child theme. What is the best way to do this?

share|improve this question
Can you post the contents of your functions.php file so we can take a look at it? s_ha_dum is correct. – gteh Dec 23 '12 at 18:34

If the script is registered and enqueued correctly you might be able to deregister it, but you have posted nowhere enough information for me to really say how.

Parent themes load after the child so that is another potential issue, depending on how the theme is written.

share|improve this answer
Thank you all.this is the line i dont want: if(!is_admin()){ wp_register_script( 'Tipsy', WP_THEME_URL . '/assets/javascripts/jquery.tipsy.js', false, null, true); wp_enqueue_script( 'Tipsy' ); global $user_ID; if( $user_ID ) : if( current_user_can('level_10') ) : wp_deregister_script( 'Tipsy' ); endif; endif; wp_register_script( 'SkeletonKey', WP_THEME_URL . '/assets/javascripts/skeleton-key.js', false, null, true); wp_enqueue_script( 'SkeletonKey' ); } – Daniel Dec 24 '12 at 6:52
Edit you answer to include the code, please. Code formatting in comments is nearly non-existent, making long chunk unreadable. – s_ha_dum Dec 24 '12 at 15:03

Have you tried commenting those lines out?

//function this script () blahblah .js
share|improve this answer

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.