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 trialTheo Bouwman
2,812 PointsNavigation style
Navigation is working fine, but the style isn't working. It has the bullets before it, but I have declared -> $defaults = array( 'container' => false, 'theme_location' => 'primary-menu', 'menu_class' => 'no-bullet' );
wp_nav_menu( $defaults );
Plz help
2 Answers
Theo Bouwman
2,812 PointsIn the tutorial video the menu looks nice. But on my webpage the menu looks like a normal list. If I remove the added php: <?php
$defaults = array(
'container' => false,
'theme_location' => 'primary-menu',
'menu_class' => 'no-bullet'
);
wp_nav_menu( $defaults );
?>
And un comment the static menu:
'''<!--<ul class="no-bullet"> ''' <li class="current parent"><a class='current' href="index.html">Portfolio</a> '''<ul class="sub-menu"> ''' <li><a href="item.html">Portfolio Item</a></li> ''' <li><a href="item.html">Portfolio Item</a></li> ''' <li><a href="item.html">Portfolio Item</a></li> '''<li><a href="item.html">Portfolio Item</a></li> '''</ul> ''' </li> ''' <li class="parent"><a href="blog.html">Blog</a> ''' <ul class="sub-menu"> ''' <li><a href="single-post.html">Single Post</a></li> ''' <li><a href="author.html">Author Page</a></li> ''' </ul> ''' </li> ''' <li><a href="about.html">About</a></li> ''' <li><a href="contact.html">Contact</a></li> '' </ul>-->
Then it will look nice.
So my question is: what am I doing wrong???
Joshua Niemeyer
8,155 PointsWhat html is being output to the front end of the site? Is the 'no-bullet' class being added to the ul tag successfully? If so, be sure you're referencing the right class name.