Orderby edits, replace with new function

Replaces code with new Woo function;

Per new Woo template files.
This commit is contained in:
Unknown 2018-03-22 14:22:17 -06:00 committed by zachary
parent 6e90bab3df
commit a2c4a4665c
1 changed files with 2 additions and 15 deletions

View File

@ -27,19 +27,6 @@ if ( ! defined( 'ABSPATH' ) ) {
<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 ) . '" />';
}
}
?>
<input type="hidden" name="paged" value="1" />
<?php wc_query_string_form_fields( null, array( 'orderby', 'submit', 'paged', 'product-page' ) ); ?>
</form>