Hello Summer Sale!
Exclusive season-opening discount on TheGem theme.
Limited time offer.

Okay
  Public Ticket #1144451
Search box
Closed

Comments

  • Antonino started the conversation

    Hello, I purchased the theme yesterday, and I think is really really awesome but it lacks of a good/normal ajax search box. I bought this theme because its so cool but unfortunately I will not going to use the theme (and I know its my fault)  because my friends wants the big ajax search box like almost all e-commerce have, unless I find a way to integrate a plugin or modify the existing search box icon. I hope you can help me with this problem. thank you.

  •  7,280
    Oliver replied

    HI!

    On order to add your search function, you need to deactivate default search form by adding next code to the functions.php of the child theme:

    function thegem_child_init_icon() {
        remove_filter('wp_nav_menu_items', 'thegem_menu_item_search', 10);
    }
    add_action('init', 'thegem_child_init_icon');

    and add your search form, code example:

    function thegem_menu_item_search_new($items, $args){
        if($args->theme_location == 'primary' && thegem_get_option('header_layout') !== 'overlay'){
            $items .= '<li class="menu-item menu-item-search">YOUR FORM CODE</li>';
        }
        return $items;
    }
    add_filter('wp_nav_menu_items', 'thegem_menu_item_search_new', 20, 2);
    


    Please note if you comment on your ticket before we reply, your ticket will be pushed down of the tickets list. 

    Regards, Oliver