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

WordPress

Wordpress Menu Navigation Active Class

Hey all, trying to add an active class for my website so users can easily tell which page they're on. Can't seem to figure it out, tried ".current_page_item" class but it still wouldn't take.. hm. Any suggestions?

Check out my website @ hannahswann.com

Thanks!

3 Answers

Argh! Nevermind. Not totally sure what happened with that one but it was as simple as

.current-menu-item a {
    color: #E5CB6B;
}

Also tried current-menu-item . Wondering if I need to add some PHP?

It needed to be below the ".nav-links" style in the stylesheet, nav-links is much more detailed.. I guess that's why it wasn't working originally.