Submenu items indented on mobilemenu
-
Topic
-
Hey,
Just wondering if you have anything to group the submenu items with their parents on the mobile menu. My site has drop downs for each main menu item in the navbar. on mobile it turns into one big long list. I have built one for a magento theme using javascript that dynamically creates it on page load but havent done it on a wordpress theme. used this as reference http://jsfiddle.net/Kq43X/122/
I see your code in framework/frontend/functions/parts.php that builds it but wanted to see if you had the code change already that I could plug in there to give parents.
/** * Responsive wp nav menu * * @since 2.0.0 * * @param string $location Location of wp nav menu to grab * @return string $select_menu Select menu version of wp nav menu */ if( ! function_exists( 'themeblvd_nav_menu_select' ) ) { function themeblvd_nav_menu_select( $location ) { $select_menu = ''; $locations = get_nav_menu_locations(); if( isset( $locations[$location] ) ) { $menu = wp_get_nav_menu_object( $locations[$location] ); if( is_object( $menu ) ) { $menu_items = wp_get_nav_menu_items( $menu->term_id ); if( ! empty( $menu_items ) ) { $select_menu .= '<form class="responsive-nav" action="" method="post">'; $select_menu .= '<select class="tb-jump-menu">'; $select_menu .= '<option value="">'.themeblvd_get_local('navigation').'</option>'; foreach( $menu_items as $key => $item ) $select_menu .= '<option value="'.$item->url.'">'.$item->title.'</option>'; $select_menu .= '</select>'; $select_menu .= '</form>'; } } } return $select_menu; } }
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The forum ‘Akita Responsive WordPress Theme’ is closed to new topics and replies.