Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #614053

    Hi,

    I have a customer who doesn’t think the magnifier in the menu isn’t very clear as a search function…
    What’s the easiest way of changing it to a form with the text ‘search’?

    Thanks,
    Monique

    #616206

    Hey boemedia!

    Thank you for using Enfold.

    Disable the default search icon then add this in the functions.php file:

    // add actual search form
    add_filter( 'wp_nav_menu_items', 'avia_append_search_nav_mod', 10, 2);
    function avia_append_search_nav_mod($items, $args) {
        if( $args->theme_location != 'avia' ) return;
        ob_start();
        get_search_form();
        $form =  ob_get_clean();
    
        $items .= '<li id="menu-item-search" class="menu-item-search-mod menu-item">'.$form.'</li';
        return $items;
    }

    And the following code in the Quick CSS field:

    #menu-item-search form div {
        opacity: 1 !important;
        display: block !important;
    }

    Best regards,
    Ismael

    #622047

    Hi Ismael,

    I’m afraid this causes an error, see private content part.

    #623087

    Hey!

    Please refer to my post here – https://kriesi.at/support/topic/search-icon-on-mobile-devices/#post-589759 and skip the last part. That would make it visible only on mobile

    Best regards,
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.