Search work for only woo-commerce product data?

Search work for only woo-commerce product data?

Trainee Asked on March 4, 2017 in WORDPRESS.
Add Comment
1 Answer(s)
<div>
<form role="search" method="get" class="woocommerce-product-search" action="<?php echo esc_url( home_url( '/'  ) ); ?>">
    <label class="screen-reader-text" for="s"><?php _e( 'Search for:', 'woocommerce' ); ?></label>
    <input type="search" class="search-field" placeholder="<?php echo esc_attr_x( 'Search Products&hellip;', 'placeholder', 'woocommerce' ); ?>" value="<?php echo get_search_query(); ?>" name="s" title="<?php echo esc_attr_x( 'Search for:', 'label', 'woocommerce' ); ?>" />
    <input type="submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'woocommerce' ); ?>" />
    <input type="hidden" name="post_type" value="product" />
</form>
</div>
Team Leader Answered on March 6, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.