How to add a search bar in the top menu in Zerif

As we always recommend to everyone, please make sure that you're using a child theme with your Zerif theme.

In your child theme, add the following snippet just above ?> closing tag or in the end of the functions.php file if there is no closing tag:

add_filter( 'wp_nav_menu_items','add_search_box', 10, 2 );
function add_search_box( $items, $args ) {
    $items .= '<li class="widget widget_search">' . get_search_form( false ) . '</li>';
    return $items;
}

For the Spanish version of this feature you can check out this article: ¿CÓMO AÑADIR UNA BARRA DE BÚSQUEDA EN EL MENÚ SUPERIOR?

Alternatively you could install this plugin: https://wordpress.org/plugins/bop-search-box-item-type-for-nav-menus/

Then simply add the search box to the menu in Appearance->Menus