auth
5 years ago
cart
6 years ago
checkout
6 years ago
emails
6 years ago
global
6 years ago
loop
6 years ago
myaccount
5 years ago
notices
6 years ago
order
6 years ago
single-product
6 years ago
archive-product.php
6 years ago
content-product.php
7 years ago
content-product_cat.php
6 years ago
content-single-product.php
6 years ago
content-widget-price-filter.php
6 years ago
content-widget-product.php
7 years ago
content-widget-reviews.php
6 years ago
product-searchform.php
7 years ago
single-product-reviews.php
5 years ago
single-product.php
6 years ago
taxonomy-product_cat.php
6 years ago
taxonomy-product_tag.php
6 years ago
product-searchform.php
29 lines
| 1 | <?php |
| 2 | /** |
| 3 | * The template for displaying product search form |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/product-searchform.php. |
| 6 | * |
| 7 | * HOWEVER, on occasion WooCommerce will need to update template files and you |
| 8 | * (the theme developer) will need to copy the new files to your theme to |
| 9 | * maintain compatibility. We try to do this as little as possible, but it does |
| 10 | * happen. When this occurs the version of the template file will be bumped and |
| 11 | * the readme will list any important changes. |
| 12 | * |
| 13 | * @see https://docs.woocommerce.com/document/template-structure/ |
| 14 | * @package WooCommerce/Templates |
| 15 | * @version 3.3.0 |
| 16 | */ |
| 17 | |
| 18 | if ( ! defined( 'ABSPATH' ) ) { |
| 19 | exit; |
| 20 | } |
| 21 | |
| 22 | ?> |
| 23 | <form role="search" method="get" class="woocommerce-product-search" action="<?php echo esc_url( home_url( '/' ) ); ?>"> |
| 24 | <label class="screen-reader-text" for="woocommerce-product-search-field-<?php echo isset( $index ) ? absint( $index ) : 0; ?>"><?php esc_html_e( 'Search for:', 'woocommerce' ); ?></label> |
| 25 | <input type="search" id="woocommerce-product-search-field-<?php echo isset( $index ) ? absint( $index ) : 0; ?>" class="search-field" placeholder="<?php echo esc_attr__( 'Search products…', 'woocommerce' ); ?>" value="<?php echo get_search_query(); ?>" name="s" /> |
| 26 | <button type="submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'woocommerce' ); ?>"><?php echo esc_html_x( 'Search', 'submit button', 'woocommerce' ); ?></button> |
| 27 | <input type="hidden" name="post_type" value="product" /> |
| 28 | </form> |
| 29 |