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 Theme Development Building Out WordPress Navigation Building Out WordPress Navigation Quiz

Colton Fitzgerald
Colton Fitzgerald
15,815 Points

Why is 'menu_class' not how you set the class of your <ul> on this quiz?

In the quiz there is a question that asks about how you put a class on your menu. In the video, Zac uses this example:

<?php
$defaults = array(
    'container' => false,
    'theme_location' => 'primary-menu',
    'menu_class' => 'no-bullet'
);
    wp_nav_menu($defaults);
?>

Why is "'menu_class' => 'class-name'" The wrong answer?

1 Answer

@Colton Fitzgerald,

If you check the WordPress Codex Function Reference for the wp_nav_menu() function, you will notice that using " 'menu_class' => 'menu' " is actually correct. I think the author of the quiz made a simple mistake. I submitted feedback directly on the quiz.

You can access the option to "Provide feedback" in the pop-up modal, just after finishing a quiz. It might be more prudent to pose the question there. I think feedback on quizzes might have a better chance of reaching the appropriate channels more quickly through the contextual feedback loop they have established.

Just a thought,

Adam

Colton Fitzgerald
Colton Fitzgerald
15,815 Points

Sweet! I'll be sure to use the feedback button next time