To begin "Mystile" create a directory \wp-content\themes\mystile\woocommerce\loop\ in your "Mystile" theme directory
Copy the archive-product.php template from \wp-content\plugins\woocommerce\templates\ to \wp-content\themes\mystile\woocommerce\
orderby.php template from \wp-content\plugins\woocommerce\templates\loop\ to \wp-content\themes\mystile\woocommerce\loop\
Now edit the files we created:
archive-product.php
before:
<?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?> <h1 class="page-title"><?php woocommerce_page_title(); ?></h1> <?php endif; ?>
open our <div class="page-title-wrap">
<!-- Start Page Title Wrap--> <div class="page-title-wrap"> <?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?> <h1 class="page-title"><?php woocommerce_page_title(); ?></h1> <?php endif; ?>
orderby.php
after:
<form class="woocommerce-ordering" method="get"> <select name="orderby" class="orderby"> <?php foreach ( $catalog_orderby_options as $id => $name ) : ?> <option value="<?php echo esc_attr( $id ); ?>" <?php selected( $orderby, $id ); ?>><?php echo esc_html( $name ); ?></option> <?php endforeach; ?> </select> <?php // Keep query string vars intact foreach ( $_GET as $key => $val ) { if ( 'orderby' === $key || 'submit' === $key ) { continue; } if ( is_array( $val ) ) { foreach( $val as $innerVal ) { echo '<input type="hidden" name="' . esc_attr( $key ) . '[]" value="' . esc_attr( $innerVal ) . '" />'; } } else { echo '<input type="hidden" name="' . esc_attr( $key ) . '" value="' . esc_attr( $val ) . '" />'; } } ?> </form>
close our </div>
<form class="woocommerce-ordering" method="get"> <select name="orderby" class="orderby"> <?php foreach ( $catalog_orderby_options as $id => $name ) : ?> <option value="<?php echo esc_attr( $id ); ?>" <?php selected( $orderby, $id ); ?>><?php echo esc_html( $name ); ?></option> <?php endforeach; ?> </select> <?php // Keep query string vars intact foreach ( $_GET as $key => $val ) { if ( 'orderby' === $key || 'submit' === $key ) { continue; } if ( is_array( $val ) ) { foreach( $val as $innerVal ) { echo '<input type="hidden" name="' . esc_attr( $key ) . '[]" value="' . esc_attr( $innerVal ) . '" />'; } } else { echo '<input type="hidden" name="' . esc_attr( $key ) . '" value="' . esc_attr( $val ) . '" />'; } } ?> </form> </div><!-- End Page Title Wrap-->
Thus, after updating the Woocommerce plugin, your changes will remain