admin管理员组文章数量:1122846
I'm having some trouble getting the wp_nav_menu to work properly. This is the first time I have worked with this and for the most part it has all come together. My only issue that I am having is with the functionality of the dropdown menus. All of the pages are appearing correctly in the appropriate spot (the primary navigation), but the "fly outs" or drop down submenus are always appearing.
I have of course registered the menu and have placed the wp_nav_menu portion in the navigation. My guess is I have no added support for the dropdown menus to BE drop down menus?
I might also mention that this is a custom theme. I've built it from the bottom up. It's also in a development environment which will be hard to show you guys a live example. For this reason I have attached a screenshot.
wp_nav_menu( array(
'menu' => 'Primary Navigation',
'container_class' => 'primaryNav',
'depth' => 2,
'fallback_cb' => 'none',
'theme_location' => 'Primary Navigation',
));
register_nav_menu( 'Primary Navigation', 'Primary Navigation' );
add_theme_support( 'menus' );
I've come across two possibilities. I've seen mention of "walker," to which I have little to no understanding of. OR maybe it's as simple as adding some jquery to make them work? I am just under the impression that the functionality should already be there?
Thanks in advance for any help.
Will
I'm having some trouble getting the wp_nav_menu to work properly. This is the first time I have worked with this and for the most part it has all come together. My only issue that I am having is with the functionality of the dropdown menus. All of the pages are appearing correctly in the appropriate spot (the primary navigation), but the "fly outs" or drop down submenus are always appearing.
I have of course registered the menu and have placed the wp_nav_menu portion in the navigation. My guess is I have no added support for the dropdown menus to BE drop down menus?
I might also mention that this is a custom theme. I've built it from the bottom up. It's also in a development environment which will be hard to show you guys a live example. For this reason I have attached a screenshot.
wp_nav_menu( array(
'menu' => 'Primary Navigation',
'container_class' => 'primaryNav',
'depth' => 2,
'fallback_cb' => 'none',
'theme_location' => 'Primary Navigation',
));
register_nav_menu( 'Primary Navigation', 'Primary Navigation' );
add_theme_support( 'menus' );
I've come across two possibilities. I've seen mention of "walker," to which I have little to no understanding of. OR maybe it's as simple as adding some jquery to make them work? I am just under the impression that the functionality should already be there?
Thanks in advance for any help.
Will
Share Improve this question edited Aug 2, 2013 at 5:36 Charles Clarkson 3,6951 gold badge18 silver badges19 bronze badges asked Aug 2, 2013 at 2:48 Will MWill M 1 1- 1 this is a function of your theme's css and isn't specific to WordPress. see the style.css file from the default twentytwelve theme, or search the web for css dropdown menu. – Milo Commented Aug 2, 2013 at 3:40
1 Answer
Reset to default 0You have to modify style.css. What you should do is look at your source code and see the structure you generated for your menu, and then change your menu accordingly. There are lots of tutorials on the web, all you have to do is Google "css menu tutorial" or "css menu example" and you will find a solution to your problem.
本文标签: WP NAV MENUDropdown always showing
版权声明:本文标题:WP NAV MENU - Dropdown always showing 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736286120a1927602.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论