WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using a theme that is using Superfish for the navigation menu. The problem is, if the sub item is too long it will drop underneath, i want to keep the individual menu item's text on one line.

Now i've found supersubs for the superfish menu but i don't know how to add it to the theme.

This is in the functions.php file.

wp_enqueue_script('superfish', get_stylesheet_directory_uri() . '/js/superfish.js');

and this is in the header.php file.

<script type="text/javascript">
//Drop Down Menu
    delay: 1000,
    animation: {opacity:'show',height:'show'},
    speed: 'normal',
    autoArrows:  true,
    dropShadows: false

How can i add supersubs to the menu as well to solve the problem i'm having with the sub items.


share|improve this question

Have you tried adding this to the themes functions.php?

 function add_supersubs() {
    wp_enqueue_script('superfish', get_stylesheet_directory_uri() . '/js/superfish.js');
    wp_register_script('supersubs', get_stylesheet_directory_uri() . '/js/supersubs.js','superfish');

add_action('wp_enqueue_scripts', 'add_supersubs'); //

this assumes the supersubs.js is in the js folder of the main theme directory.

You'll also need to modify the header js to fit supersubs.

share|improve this answer
I would recommend putting the register/enqueue functions for supersubs in the same callback as the enqueue for superfish, just for clarity. Also, it might be useful to make superfish a dependency for supersubs? – Chip Bennett Feb 26 '12 at 19:34
Thanks BandonRandon, but what about the header.php. What do i put in there? – Corbula Feb 26 '12 at 20:53
@Corbula I've never used supersubs but the docs seem to help you out here users.tpg.com.au/j_birch/plugins/superfish/#examples (see example 5) – BandonRandon Feb 28 '12 at 17:14
@ChipBennett I agree, just without the callback it's hard to do that :) – BandonRandon Feb 28 '12 at 17:15
@BandonRandon well, you could always move the superfish enqueue into the callback you're creating. :) – Chip Bennett Feb 28 '12 at 17:37

Your Answer


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.