Skip to content

Instantly share code, notes, and snippets.

@lmartins
Created November 11, 2014 20:30
Show Gist options
  • Save lmartins/ee149211407d5b922fe6 to your computer and use it in GitHub Desktop.
Save lmartins/ee149211407d5b922fe6 to your computer and use it in GitHub Desktop.
Manually add options to existing navigation Menus
add_filter( 'wp_nav_menu_items', 'your_custom_menu_item', 10, 2 );
function your_custom_menu_item ( $items, $args ) {
if ($args->theme_location == 'header') {
$items .= '<li class="menu-item"><a id="openOptionsSidebar" class="shifter-handle">More</a></li>';
}
return $items;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment