Customizing Only a Specific Menu using the “wp_nav_menu_items” Hook?

Thanks to some help on here, I’ve managed to add a custom search box to my main menu… by adding this to my theme’s functions.php add_filter(‘wp_nav_menu_items’,’search_box_function’); function search_box_function ($nav){ return $nav.”<li class=”menu-header-search”><form action=’http://example.com/’ id=’searchform’ method=’get’><input type=”text” name=”s” id=’s’ placeholder=”Search”></form></li>”; } However, I’ve now added another menu to put in the footer, but the search box … Read more

add_menu_page() with different name for first submenu item

The add_menu_page documentation says to pass the menu title as the second parameter: add_menu_page(‘Page Title’, ‘Menu Title’, …); When adding more pages later via add_submenu_page, the main page becomes the first entry in the submenu: However, I want the first item in the list to have a different name (but still point to the same … Read more