How to Remove Superfish Dropdown Scripts in Genesis Theme

By Posted 2012 Updated   BloggingTutorialsWordPress

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.


4 comments on “How to Remove Superfish Dropdown Scripts in Genesis Theme

  1. BasicWP says:

    By default, the superfish file does not load when the ‘fancy dropdowns’ option is disabled – I confirmed that in the source code.

    Hence, not sure if this code is required. More insights will be welcomed.

  2. Eddie Gear says:

    Wow that is an interesting catch. My blog are powered by StudioPress themes. I think I will need to tweak the code to ensure that its faster. Thanks for the simple and easy tutorial.

  3. King says:

    this one is interesting way that helps in speeding up your blog.. added this piece of code to my blog design

Leave a Reply

Your email address will not be published. Required fields are marked *




Next Article »
css.php