Orderby edits, replace with new function
Replaces code with new Woo function; Per new Woo template files.
This commit is contained in:
parent
6e90bab3df
commit
a2c4a4665c
|
@ -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>
|
||||
|
|
Reference in New Issue