Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Briar Bouthot
5,356 Pointsadd_theme_support('menus'); = not working
Am I missing something here? In my functions.php I have the following:
<php
add_theme_support( 'menus' );
?>
2 Answers

J Andrew Scott
30,626 PointsThe WP Codex says this should go in an action hook. See Function Reference/add theme support.
Try this instead.
<?php
function add_menu_support() {
add_theme_support( 'menus' );
}
add_action( 'after_setup_theme', 'add_menu_support' );
?>

Alejandro Hernandez
7,629 PointsWhats your intention? Are you trying to add wp navigation?
If so you might want to reference this: http://codex.wordpress.org/Navigation_Menus
Edward C. Young
10,323 PointsEdward C. Young
10,323 PointsThis structure should only be used if theme support needed requires more than 1 item. Of particular importance to the OP's question is:
The add_theme_support function is part of Core and doesn't necessarily need to be called from another function. I believe the OP will fix the problem by moving the function to the top of the functions file.