How to add all current filter query parameters back to a new query?
-
I have a custom post type, with filters for two custom taxonomies on the main post type archive (using the Filter Everything plugin). I want to add an option to change the sort order of the posts.
I created buttons which add the chosen sort to the query. This works fine when it’s applied to the full archive (with no other queries). If I then filter using FE, the chosen sort order is retained on the filtered posts.
But if I filter using FE *first*, and then click the sort order button, the filter queries are lost. I can’t figure out why this happens, or how to re-add them back to the query that’s sent when clicking the sort order button. I’ve tried setting the form action to the current full url ($_SERVER[‘REQUEST_URI’]), but the custom taxonomy queries are still lost.
Why do the custom taxonomy queries disappear when sending a new query? How do I add them back to the new query that’s sent using a form submission?
The page I need help with: [log in to see the link]
- The topic ‘How to add all current filter query parameters back to a new query?’ is closed to new replies.