Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I can't find a good tutorial on the new menu handling functions, and the ones I found don't seem to work for me. What am I doing wrong?

In my functions.php:

(I'm using the Blank Slate theme as a framework; I'll figure out later what's noise, but it's pretty minimal -- hence the name)

function blankslate_register_menus() {
    register_nav_menus( array( 'main-menu' => __( 'Main Menu', 'blankslate' )));

Next, on header.php:

    <?php wp_nav_menu( array( 'theme_location' => 'main-menu' ) ); ?>

And finally, testing my style.css for every possible option:

.main-menu, .main-menu *, #main-menu *, #main-menu {
    font-size: 40px;

Does nothing. The menu items are simply listed like a simple HTML <ul> would be. I've followed this tutorial: which is the opnly decent and recent one I found, but I don't see what I've done different.

(if I try the class .menu, it works, so the problem is in what I'm assuming the classes are?)

Also, the tutorial mentions a whole lot of parameters that cane be added to the register_nav_menu() function, like custom tags, and using <div> by default, yet no mention of how to actually set them.

Any help?

My theme is almost done and I've been stuck on a freaking menu function all day... I'd've made a menu old school by now :/

share|improve this question

1 Answer 1

up vote 1 down vote accepted


    <?php wp_nav_menu( array( 'theme_location' => 'main-menu' ) ); ?>


Should be:

<?php wp_nav_menu( array( 'theme_location' => 'main-menu', 'menu_class' => 'main_menu' ) ); ?>

The css:

.main_menu {
   font-size: 14px; // example


Learn more here: wp_nav_menu

Best of luck,

share|improve this answer
Thank you. I misunderstood the documentation and didn't quite understand what the function spits out. – iDontKnowBetter Jul 12 '12 at 4:13
no problem mate - glad you got it working ;) – Sagive SEO Jul 12 '12 at 6:11

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.