Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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:


//Enable custom menus (can see under Appearances)


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!