Help with ordering custom taxonomy
-
Hi everyone – first post here!
I’d like some assistance on how best to allow the user to choose how a list of games are arranged.
I have a custom post type : slot and the custom taxonomy: slot-categories
The page shows a paginated list of all the slots in that category absolutely fine. My problem starts when I want to allow the user to filter that list. I would like the user to be able to order the slot games by A-Z, Z-A, Top rated Up and Down (custom field), and choose to Show all, therefore removing the pagination. I’ve so far managed to do that with using variables in the URL.
Here’s the problem…
URL for sorting: /slot-categories/adventure-treasure/?sort=asc – works
URL for pagination: /slot-categories/adventure-treasure/page/2 – works
URL that the pagination returns for both: /slot-categories/adventure-treasure/?sort=asc/page/2 – breaksAs you can see, the sort=asc is before the pagination and therefore breaks the workings of the page.
In an ideal world, I’d like the user to be able to set a session or something, so if they press A-Z once, they won’t have to press it again for the other categories they view. This would hopefully also remove the need of having sorting variables in the URL?
I’ve been working on this for days so I hope somebody has come across this before, got a link to a tutorial or something like this so I can get over the problem!
Many thanks in advance
The topic ‘Help with ordering custom taxonomy’ is closed to new replies.