View difference between Paste ID: 9ae11wuX and yWFD4yBa
SHOW: | | - or go back to the newest paste.
1
add_filter('wp_nav_menu_items','add_search_box', 10, 2);
2
function add_search_box($items, $args) {
3
    if($args->theme_location == 'header-menu') {
4
        ob_start();
5-
        get_search_form();
5+
        get_product_search_form();
6
        $searchform = ob_get_contents();
7
        ob_end_clean();
8
 
9
        return $items .= '<li id="searchform-item">' . $searchform . '</li>';
10
    }
11
    return $items;
12
}