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

PHP How to Build a WordPress Theme WordPress Theme Functions Creating a Dynamic Menu

Can't create menu with pages

I'm trying to create a menu with the pages I created at the beginning of this track.

Here's the code for the functions.php file:

    <?php

//Enable custom menus (can see under Appearances)
add_theme_support('menus');

?>

However, despite clicking the checkboxes, the 'Add to Menu' button is not activated. I searched for a similar problem on forums but haven't found anything so I'm posting here. Anyone know how to fix this?

Edit: don't know why there's a random indent before the <?php but it's not actually in my code. Also I tried deactivating and reactivating plugins but those don't seem to be the problem...

1 Answer

Doh! Never mind - after deleting the menu I made and creating a new one I was able to add the pages!