dropdown menu-item

Posted in: Newsmag
Post count: 7

Hi,

Can you please help with the next:

I want to add a (menu-item-1602) that has a 114 submenus to a page. In the header menu I did manage to add a scroll to menu-item-1601 by using the below css:


@media
(min-width: 768px){
.menu-item-1601 ul {
overflow: overlay;
height: 300px;
}
}

Now i want to add a clone of this menu item (menu-item-1602) in the middle of the page and have used the below function to create a shortcode:

function print_menu_shortcode($atts, $content = null) {
extract(shortcode_atts(array( ‘name’ => null, ), $atts));
return wp_nav_menu( array( ‘menu’ => $name, ‘echo’ => false ) );
}
add_shortcode(‘menu’, ‘print_menu_shortcode’);

The problem is that I want to add the style of the drop-down-box (https://forum.tagdiv.com/topic/drop-down-box/) but I am not able to make it work. Can you please help with the style for his menu-item?
Thanks

Post count: 6600

Hi,

I’m not sure what result you get using this implementation but you can try to use wp_nav_menu() parameters: http://screencast.com/t/7EoirP1ZC to wrap your menu into a specific container which you can use afterwards to target and style it as you need it.

Hope this helps!
Thanks for the message!

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.