I made a custom type named foods and a taxonomy named fruits. I want to order the fruits name alphabetically ( A-Z ) on clicking a button and then clicking on it again it will show Z-A order.
Can you tell me how to do it please?
I made a custom type named foods and a taxonomy named fruits. I want to order the fruits name alphabetically ( A-Z ) on clicking a button and then clicking on it again it will show Z-A order.
Can you tell me how to do it please?
Comments are closed.
Pass order parameter in url on click on link like /?order=DESC or if you are using a button then it must be submitting a form with order field value change GET to POST and field name