Title: Deregister Shiftnav Script
Last modified: August 30, 2016

---

# Deregister Shiftnav Script

 *  Resolved [cgold](https://wordpress.org/support/users/cgold/)
 * (@cgold)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/deregister-shiftnav-script/)
 * Hi Guys,
 * What is the php code for de-register shiftnav javascript shiftnav.min.js?
 * I am using a mobile theme whihc has its own menu and functions and I can see 
   shiftnav javascript is loading and I only require it on desktop.
 * You can see the script is loading on mobile here:[https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fwww.thetrendspotter.net%2F](https://developers.google.com/speed/pagespeed/insights/?url=http%3A%2F%2Fwww.thetrendspotter.net%2F)
 * Thanks
    Colin
 * [https://wordpress.org/plugins/shiftnav-responsive-mobile-menu/](https://wordpress.org/plugins/shiftnav-responsive-mobile-menu/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [sevenspark](https://wordpress.org/support/users/sevenspark/)
 * (@sevenspark)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/deregister-shiftnav-script/#post-6391752)
 * Hi Colin,
 * The ShiftNav assets are loaded with these two hooks:
 *     ```
       add_action( 'wp_enqueue_scripts' , 'shiftnav_load_assets' , 101 );
       add_action( 'wp_enqueue_scripts' , 'shiftnav_pro_load_assets' , 20 );
       ```
   
 * To remove that ShiftNav assets, I’d just unhook those actions.
 * Since you’re using the Pro version, in the future please **[Submit a Ticket](http://sevenspark.com/help)**
   to the pro support center so we can make sure to see your ticket as soon as possible.
   Thanks 🙂
 * Chris
 *  Thread Starter [cgold](https://wordpress.org/support/users/cgold/)
 * (@cgold)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/deregister-shiftnav-script/#post-6391841)
 * Can you please tell me which file this code is locate in? I have used the following
   code to deregister shiftnav plugin however its not working.
 *  I have no problem using the same code to deregister other plugins.
 * function my_deregister_javascript() {
    wp_deregister_script( ‘shiftnav_load_assets’);
   wp_deregister_script( ‘shiftnav_pro_load_assets’ ); }
 *  Plugin Author [sevenspark](https://wordpress.org/support/users/sevenspark/)
 * (@sevenspark)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/deregister-shiftnav-script/#post-6391843)
 * Hi Colin,
 * That code doesn’t make sense, because those are action functions, not asset handles.
 * As I said, you should unhook the actions, not dequeue the scripts.
 * The code would just be something like this
 *     ```
       add_action( 'wp' , 'remove_shiftnav_assets' );
       function remove_shiftnav_assets(){
       	remove_action( 'wp_enqueue_scripts' , 'shiftnav_load_assets' , 101 );
       	remove_action( 'wp_enqueue_scripts' , 'shiftnav_pro_load_assets' , 20 );
       }
       ```
   
 * Again, if you have any further questions, please **[Submit a Ticket](http://sevenspark.com/help)**.
   Thanks.
 * Chris

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Deregister Shiftnav Script’ is closed to new replies.

 * ![](https://ps.w.org/shiftnav-responsive-mobile-menu/assets/icon-256x256.jpg?
   rev=2247219)
 * [ShiftNav - Responsive Mobile Menu](https://wordpress.org/plugins/shiftnav-responsive-mobile-menu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shiftnav-responsive-mobile-menu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shiftnav-responsive-mobile-menu/)
 * [Active Topics](https://wordpress.org/support/plugin/shiftnav-responsive-mobile-menu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shiftnav-responsive-mobile-menu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shiftnav-responsive-mobile-menu/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [sevenspark](https://wordpress.org/support/users/sevenspark/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/deregister-shiftnav-script/#post-6391843)
 * Status: resolved