How to Remove Superfish Dropdown Scripts in Genesis Theme

How can you disable and remove  Superfish dropdown scripts which are loaded by default in Genesis themes. You can see 2 scripts being loaded at bottom of all pages. These are 2 amazing scripts which power the Fancy dropdown menus in Genesis theme.

Genesis theme superfish scripts

You are aware that QOT is now powered by Genesis theme and we are looking for ways to customize Genesis to make it load site faster. Fancy menus is a cool feature of Genesis theme, which allows your custom menus to get Fancy dropdowns for your links and categories for better site navigation, and is powered by the beautiful Superfish jquery codes.

Disable Superfish Dropdown Scripts

Genesis theme users can choose to disable Fancy menus from the Genesis options to increase site speed by disallowing this feature. But even if you disable fancy dropdown menus, the scripts continues to load! So disabling the feature will not get rid of the scripts.

fancy dropdown menus

So how to disable these scripts. Simply insert the following code into the custom theme functions file to unregister these superfish scripts. Locate the functions.php file in your Child theme and add the following code.

function unregister_superfish() {
wp_deregister_script( 'superfish' );
wp_deregister_script( 'superfish-args' );
add_action( 'wp_enqueue_scripts', 'unregister_superfish' );

Take care to add this code between the php open and close tags. The theme functions file is a very powerful file and any error can take your site offline. So it is a good idea to backup this file code before altering it. Should anything go wrong, you will need to login to your server via FTP and restore the file code.

Refresh your WordPress Cache and the Superfish scripts will be gone. I like to remove unnecessary scripts as they increase site load time. So if you do not use this dropdown feature, better to remove the scripts.

Share with friends

About the Author: P Chandra is editor of QOT, one of India's earliest tech bloggers since 2004. A tech enthusiast with expertise in coding, WordPress, web tools, SEO and DIY hacks.