Hi,
I thought it is possible to achieve. Could you please try to add the following function into the functions.php file? You should do it in the child theme mode.
function prefix_add_extra_menu_content($items, $args){
$newitems = $items;
if( $args->theme_location == 'primary' ){ // Check if menu location is primary
$newitems .= $items;
$newitems .= get_search_form(false); // Display search form
}
return $newitems;
}
add_filter('wp_nav_menu_items', 'prefix_add_extra_menu_content', 10, 2);
Let me know how it goes. I’ll wait to hear back from you regarding your stats.
Regards,
Kharis