When you’re viewing a Custom Post Type Archive, your archive-documents.php
template will be used. In your case this is the URL /documents/
.
When you’re viewing a taxonomy term, you’re viewing a Custom Taxonomy Archive, not a Custom Post Type Archive. If you haven’t created one specific to your taxonomy, then archive.php
(or index.php
, if archive.php
doesn’t exist) will be used.
You want to create a template named taxonomy-types.php
to display the posts in your custom taxonomy.
See the Template Hierarchy for more info.