<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:', 'woocommerce' ); ?></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 products…', 'woocommerce' ); ?>" value="<?php echo get_search_query(); ?>" name="s" />
<button type="submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'woocommerce' ); ?>"><?php echo esc_html_x( 'Search', 'submit button', 'woocommerce' ); ?></button>
<input type="hidden" name="post_type" value="product" />
</form>
<?php
$loop = new WP_Query( array(
'post_type' => 'product',
'posts_per_page' => get_field('products_per_page'),
'orderby' => 'menu_order',
'order' => 'ASC',
));
while ( $loop->have_posts() ): $loop->the_post(); ?>
<?php get_template_part( 'content'); ?>
<?php endwhile; wp_reset_postdata(); ?>