I have built a custom taxonomy, say, cars. The URL looks like this: http://www.example.com/cars/elantra/ and this is working fine by using the file taxonomy-cars.php as the template.

Now, I would like for example to make an index page at http://www.example.com/cars/ which would show all the cars that I have created. However, this URL always returns me a 404 error. I have tried to set up archive.php, taxonomy.php and even cars.php according to multiple sources that I was able to find online but nothing seems to be working...

Someone said to add the has_archive argument to the taxonomy register call, however, this did not work either (and it seems to be aimed at post types and not taxonomies...)

So I would like how to achieve this in the current WordPress?


I think you will have to create a page template and query all cars. Not sure if there is any other way.

  • I figured that much, but how do I make it so that example.com/cars go on this page template? I've tried using taxonomy.php, archive.php, cars.php and nothing works :/ – Dacramash Sep 13 '16 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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