Genesis Deactivate Superfish Menu Support

The Genesis Framework includes the popular jQuery Superfish Dropdown Menu Plugin. For most themes, the superfish extension is activated by default. Ever since the inclusion of superfish in Genesis, the method for deactivating it was as simple as including the following code snippet in your child theme's functions.php file:

PHP

1

2

3

4

5

add_action('wp_enqueue_scripts','sp_disable_superfish');

functionsp_disable_superfish(){

wp_deregister_script('superfish');

wp_deregister_script('superfish-args');

}

Since the release of Genesis 2.2 however, the above snippet no longer works. This is because of the new accessibility features built into the Genesis Framework. The superfish extension is required if you enable drop-down-menu support for accessibility. Among other things, superfish provides the following functionality:

Support for touch devices

Timed delay on mouseout

Animations

Keyboard accessibility

Supports the hoverIntent plugin

Indicates the presence of submenus by adding CSS-based arrows to relevant anchors

Can show the path to your current page

With the support superfish provides, if you want a WCAG 2.0 compliant website, you need to leave the extension activated.

Deactivating Superfish

The Genesis function that tests for superfish support is genesis_superfish_enabled(). The source code is:

See the section in the return statement that reads genesis_a11y( 'drop-down-menu' ). This is the test for accessibility drop-down-menu support. So if you are using the Genesis accessibility features, you now have to turn off support for dropdown menus if you want to deactivate superfish. Look for a line similar to the following in your child theme's functions.php file:

Reader Interactions

The Genesis Framework empowers you to quickly and easily build incredible websites with WordPress. Genesis provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.

We only use analytical cookies on our website that allow us to recognize and count the number of visitors and to see how visitors move around the site when they are using it, but they do not identify you individually. They help us to improve the way our website works, for example by ensuring that users are finding what they are looking for easily. Read more about the cookies we use by clicking the Cookie Policy button. By clicking OK you agree to cookies being used in accordance with our Cookie Policy. If you don’t agree you can disable cookies—see the Cookie Policy for more details.