-
-
Save billerickson/e51ed2000f543f5cc2a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($){ | |
$('#nav .wrap > ul > li').each(function() { | |
$(this).find('.right-column, .sub-menu').wrapAll('<div class="sub-menu-wrap" />'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment