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 adding a menu and sub-menus via the admin_menu hook in my functions.php. One of the sub-menus I want to add is menus.

I want to make sure that the theme supports menus before I do that, so I tried using the current_theme_supports function, but it returns false, apparently because $_wp_theme_features is still null at this stage.

What should I do? Do you think I really need this check, if I'm anyway in my functions.php? And if I do - should I use a later hook to create my menus? Or any other solution?

share|improve this question

Not really sure what you're asking here, but this allows theme support for navigation menus in your theme.

Place this block of code in your theme's functions.php file.

            'header_navigation' => 'Header Navigation',
            'main_navigation' => 'Main Navigation',
            'footer_navigation' => 'Footer Navigation'
share|improve this answer

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.