Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

My theme has a custom taxonomy template ("taxonomy-authors.php") but WordPress only serves this template file when a term associated with this taxonomy is called. e.g. example.com/cpt/authors/john-doe

When loading example.com/cpt/authors/ it will return a 404. What I want it to do is to list all terms associated with the taxonomy "authors" when example.com/cpt/authors/ is requested.

Here's part of my taxonomy-authors.php file:

<?php
    if (have_posts()) :
?>
        <h2>List of Authors</h2>

<?php
        $terms = get_terms('authors');

        foreach ($terms as $term) {
            echo $term->name;
        }

    endif;
?>

Any pointers on how to fix this?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

There's no such thing as a taxonomy archive. There is a taxonomy term archive, but no taxonomy archive.

E.g. this URL makes no sense in the current system:

example.com/category/

But this does:

example.com/category/uncategorised/
share|improve this answer
    
Ah. I see. There's no way example.com/category can be utilised at all? –  superbarney Jul 20 '13 at 4:08
    
Yes, you can put a page with a page template there, but there's no such thing as a 'term archive' out of the box unless you code one yourself. –  Tom J Nowell Jul 21 '13 at 22:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.