That page isn’t a 404, it’s returning a status code 200. The title and body tags also indicate that the page is loading just fine.
A couple of things- there is no taxonomy
argument. It would be redundant anyway, since the query already contains the queried taxonomy and term pulled from the parsed URL.
Your possible issue is outlined in this note from the WP_Query
Codex page under type
parameters:
'attachment'
– an attachment. Whilst the defaultWP_Query
post_status
is'publish'
, attachments have a defaultpost_status
of'inherit'
. This means no attachments will be returned unless you also explicitly setpost_status
to'inherit'
or'any'
.