![Genesis Theme Framework Code Snippets](https://purelysupp.com/wordpress/wp-content/uploads/sites/2/2022/09/Genesis-Code-Snippets.jpg)
Add the following code to your theme’s function.php file, or a functionality plugin to restore the Search Box to the Genesis Primary Navigation.
//* Restore Right Side Primary Nav Search
add_filter( 'wp_nav_menu_items', 'theme_menu_extras', 10, 2 );
function theme_menu_extras( $menu, $args ) {
//* Change 'primary' to 'secondary' to add search form to the secondary navigation menu
if ( 'primary' !== $args->theme_location )
return $menu;
$menu .= '<li class="right search">' . get_search_form( false ) . '</li>';
return $menu;
}
Share Your Two Cents