Your account expired support, please renew to get your support.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #34109
    pnaa
    Support Expired

    Currently, the search bar on the header displays “Search Products…” I want to remove the word Products, so it can be only “Search …” but I can’t find which file I have to change the label, can you help?

    #34149

    Please copy this function to the file functions.php ( child-theme):

    function matico_product_search()
        {
            if (matico_is_woocommerce_activated()) {
                static $index = 0;
                $index++;
                ?>
                <div class="site-search ajax-search">
                    <div class="widget woocommerce widget_product_search">
                        <div class="ajax-search-result d-none"></div>
                        <form role="search" method="get" class="woocommerce-product-search"
                              action="<?php echo esc_url(home_url('/')); ?>">
                            <label class="screen-reader-text"
                                   for="woocommerce-product-search-field-<?php echo isset($index) ? absint($index) : 0; ?>"><?php esc_html_e('Search for:', 'matico'); ?></label>
                            <input type="search"
                                   id="woocommerce-product-search-field-<?php echo isset($index) ? absint($index) : 0; ?>"
                                   class="search-field"
                                   placeholder="<?php echo esc_attr__('Search &hellip;', 'matico'); ?>"
                                   autocomplete="off" value="<?php echo get_search_query(); ?>" name="s"/>
                            <button type="submit"
                                    value="<?php echo esc_attr_x('Search', 'submit button', 'matico'); ?>"><?php echo esc_html_x('Search', 'submit button', 'matico'); ?></button>
                            <input type="hidden" name="post_type" value="product"/>
                            <?php matico_show_categories_dropdown(); ?>
                        </form>
                    </div>
                </div>
                <?php
            }
        }
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.