Hello, I’ve already used the instructions at the link https://kriesi.at/support/topic/search-box-in-mobile-responsive-menu/
But it wont work, please help.
Hey TiagoRossi!
please provide us a link to your website. Make sure to use newest theme and WordPress version.
Regards,
Andy
Both are up to date, check my site into private content.
Thank you!
Hi!
If you want to add a search box inside the mobile menu, please add this in the functions.php file:
add_filter( 'wp_nav_menu_items', 'avf_add_search', 3, 2 );
function avf_add_search( $items, $args ) {
if ($args->theme_location == 'avia')
{
$search = '<li id="menu-item-search-mobile" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-18 current_page_item menu-item-top-level menu-item-top-level-5">'.get_search_form(false).'</li>';
$items = $search . $items;
}
return $items;
}
After that, add this code in the Quick CSS field:
@media only screen and (max-width: 767px) {
#top #searchform>div {
display: block !important;
opacity: 1 !important;
}
}
Regards,
Ismael