On Edit Page screen, add a metabox called Menu Extras. This walker checks top level menu items for be_nav_menu_extra
post meta, and if there is some, includes it next to submenu in dropdown.
Example: University of Alberta, nanoFAB
<?php | |
/** | |
* Change Walker for Primary Nav | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/customizing-menu-arguments/ | |
* | |
* @param array @args | |
* @return array | |
* | |
*/ | |
function be_primary_menu_args( $args ) { | |
if( 'primary' == $args['theme_location'] ) { | |
$args['walker'] = new BE_Nav_Menu_Extras(); | |
} | |
return $args; | |
} | |
include_once( CHILD_DIR . '/lib/functions/nav-menu-extras.php' ); | |
add_filter( 'wp_nav_menu_args', 'be_primary_menu_args' ); |
jQuery(document).ready(function($){ | |
$('#nav .wrap > ul > li').each(function() { | |
$(this).find('.right-column, .sub-menu').wrapAll('<div class="sub-menu-wrap" />'); | |
}); | |
}); |