How to let users choose posts order in categories?
First in your category.php (depending on your theme files) add a simple form to let the user sort A-Z or Z-A: <form action=”” name=”custom_order” method=”POST”> <p> sort order: <select name=”CU_Order” id=”CU_Order”> <option value=”ASC”>A-Z</option> <option value=”DESC”>Z-A</option> </select> </p> <p> <input type=”hidden” name=”cs_action” value=”custom_sort_order”> <input type=”submit” name=”submit” value=”sort”> </p> </form> then using pre_get_posts hook you alter the … Read more