woocommerce/templates/loop/sorting.php

18 lines
526 B
PHP
Raw Normal View History

2011-12-11 01:10:24 +00:00
<?php
/**
* Sorting
*/
?>
<form class="woocommerce_ordering" method="post">
<select name="catalog_orderby" class="orderby">
<?php
$catalog_orderby = apply_filters('woocommerce_catalog_orderby', array(
'title' => __('Alphabetically', 'woothemes'),
'date' => __('Most Recent', 'woothemes'),
'price' => __('Price', 'woothemes')
));
foreach ($catalog_orderby as $id => $name) echo '<option value="'.$id.'" '.selected( $_SESSION['orderby'], $id, false ).'>'.$name.'</option>';
?>
</select>
</form>