Created
February 3, 2016 15:36
-
-
Save michaelvandenberg/6819b21176430d962f9c to your computer and use it in GitHub Desktop.
Add a search toggle after the regular menu items.
This file contains hidden or 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
function genius_add_search_toggle ( $items, $args ) { | |
if ( $args->theme_location == 'social') { | |
$items .= '<li id="search-toggle" class="menu-item"><a href="#"><span class="screen-reader-text">Search Toggle</span></a></li>'; | |
} | |
return $items; | |
} | |
add_filter( 'wp_nav_menu_items', 'genius_add_search_toggle', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment