Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

2 Answers

Have you tried commenting those lines out?

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

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
add comment

Your Answer

 
discard

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.