woocommerce/templates/loop/sorting.php

18 lines
600 B
PHP
Raw Normal View History

2011-12-11 01:10:24 +00:00
<?php
/**
* Sorting
*/
?>
2012-01-07 17:36:32 +00:00
<form class="woocommerce_ordering" method="<?php if (get_option( 'permalink_structure' )=="") echo 'POST'; else echo 'GET'; ?>">
2012-02-10 22:15:29 +00:00
<select name="sort" class="orderby">
2011-12-11 01:10:24 +00:00
<?php
$catalog_orderby = apply_filters('woocommerce_catalog_orderby', array(
2012-01-05 11:31:22 +00:00
'title' => __('Alphabetically', 'woocommerce'),
'date' => __('Most Recent', 'woocommerce'),
'price' => __('Price', 'woocommerce')
2011-12-11 01:10:24 +00:00
));
foreach ($catalog_orderby as $id => $name) echo '<option value="'.$id.'" '.selected( $_SESSION['orderby'], $id, false ).'>'.$name.'</option>';
?>
</select>
</form>