Correct way to use a form to to filter custom posts by taxonomy terms?

If you leave the action attribute empty, the form will post back to the current URL.

However, if your method attribute is get, the form will post back to current URL, minus the current query string.

If you want to keep the current query string, you can use hidden inputs to replicate the current parameters.

And never trust PHP_SELF!

Leave a Comment