Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

wordpress theme menu support wtih dropdown sub menus WordPress


Hi There,

Issue: In wordpress menu support with dropdown sub menus won't work.

Using wordpress on appearance => Menus I'm able to create the main menu items but when I add a submenu level it won't show/populate at all.

Here is the the header.php
===[only nav portion inserted]====
<?php wp_nav_menu( array( 'menu' => 'Main Nav', 'menu_id' => 'nav_list', 'container' => 'div', 'container_id' => 'nav',
'container_class' => '', 'depth' => 1) ); ?>

Here is the style.css nemu portion
/* NAV */
#nav {float: right; height: 68px; position:relative; left: -50%;}
#nav_list { height: 63px; position:relative; left: 50%;
line-height: 63px; list-style: none outside none; margin: 0 auto;}
#nav_list li { display: block; float: left; padding: 0 1em;}
#content {clear: both;}
#nav_list li.current_page_item{ background: url(images/current_item.png) top center no-repeat;}
#nav_list li a{ color:#fff; text-decoration: none; display: block;}

Here is the functions.php for the theme
add_theme_support( 'menus' );
function pmc_services( $atts, $content ){
$content_inner = do_shortcode( $content );
$content =
'<section id="' . $atts['id'] . '" class="services">
<h2>' . $atts['title'] .'</h2>
. $content_inner . '
return pmc_remove_tags( $content );
add_shortcode( 'services', 'pmc_services' );
function pmc_service($atts, $content ){
$content =
'<section id="' . $atts['id'] . '" class="service_item">
<h3>' . $atts['title'] .'</h3>
' . $content . '
return pmc_remove_tags( $content );
add_shortcode( 'service', 'pmc_service' );
function pmc_remove_tags( $content ){
return strip_tags( $content, '<p>' );

Thanks in advance.


Answers (3)


designchemical answers:

Try changing the depth parameter:

<?php wp_nav_menu( array( 'menu' => 'Main Nav', 'menu_id' => 'nav_list', 'container' => 'div', 'container_id' => 'nav',
'container_class' => '', 'depth' => 0) ); ?>

Alf Baez comments:


Thanks it looks like your solution is on the right path, the only thing is that after changing the 'depth' => 0).. it won't behave as a drill down submenu neither it won't roll back to normal. Could it be that we're missing a function for that?