Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* Mobile Menu
*
*/
function be_mobile_menu() {
if( !class_exists( 'Walker_Nav_Menu_Dropdown' ) )
return;
wp_nav_menu( array(
'theme_location' => 'mobile',
'depth' => 1,
'walker' => new Walker_Nav_Menu_Dropdown(),
'items_wrap' => '<div class="mobile-menu"><form><select onchange="if (this.value) window.location.href=this.value"><option value="">Go To&hellip;</option>%3$s</select></form></div>',
) );
}
add_action( 'genesis_before_header', 'be_mobile_menu' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.