Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #735041

    Hi,

    I have read a few threads already such as https://kriesi.at/support/topic/search-icon-not-displaying-on-mobile-and-tablet/ however I still cannot get the search icon to show on my mobile device.

    I added this, but nothing?
    @media only screen and (max-width: 990px) {
    .responsive.html_mobile_menu_tablet .main_menu .avia-menu {
    display: block;
    }
    .av-main-nav li { display: none; }
    li#menu-item-search {
    display: block;
    right: 70px;
    }}

    Any ideas?

    Thanks

    #735822

    Hi,

    Has anyone been able to have a look at this please?

    #736248

    Hi,

    Thank you for using Enfold.

    Where do you want to put the search icon? It’s disabled because the default menu container is hidden on mobile view. If you want, you can add it inside the mobile menu container. Please add this filter 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" style="display: none;">'.get_search_form(false).'</li>';
    		$items = $search . $items;
    	}
    	return $items;
    }

    And the following code in the Quick CSS field.

    @media only screen and (max-width: 767px) {
    	#menu-item-search-mobile {
        	display: block !important;
    	}
    }

    Best regards,
    Ismael

    #736613

    Hi Ismael,

    That works great. Thank you and should be sufficient. I was hoping to use the icon method, but I reckon that will do.

    Thank you again for your great support.

    Regards,

    Paul

    #736777

    Hey!

    Glad that it is working. Let us know if you need anything else. :)

    Regards,
    Ismael

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Search Icon Not Showing on mobile’ is closed to new replies.