Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created April 7, 2014 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/10023226 to your computer and use it in GitHub Desktop.
Save billerickson/10023226 to your computer and use it in GitHub Desktop.
<?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