Top-level category page to show all categories
-
I’m developing a theme, which I’m pretty happy with so far. I’ve got all my categories displaying nicely on category.php when you drill down into them (e.g. “/category/cat1/”, “/category/cat1/subcat3/”, etc) using category.php.
What I want is to be able to have a top-level “category overview” page at “/category/” which shows me all top-level categories.
Coding the category list on this page is no problem – my problem is that if I visit “/category/”, I get taken to the 404 page rather than to category.php.
I can work around this by creating a page whose permalink I set to “/category/”, but this smells to me.
Is there a cleaner way of getting to a defined PHP file (whether category.php or not) when I visit “/category/”, but without losing the existing functionality of using category.php when I visit a normal category URL (“/category/something”)?
Thanks,
Dan
- The topic ‘Top-level category page to show all categories’ is closed to new replies.