Filter custom post types in archive

The problem is that you’re using term IDs in your URL, but that is incorrect.

Use the term slug instead.

For example, lets say we have a mytax term named helloworld with the term ID 1:

  • example.com/cpt/?mytax=1 404
  • example.com/cpt/?mytax=helloworld a cpt archive filtered by the helloworld term