Template files not working for archives and categories
I added category-news.php
template file to the theme directory but it doesn't apply the template of the category but instead to the index.php
file.
category-slug.php
is the highest level of the template heirarchy of WordPress so it should accept the file. I tried also category-id.php
and it also doesn't work. The same for archives template files.
However, when I use single-slug.php
or page-slug.php
it's working without any problems.
I checked that there is not any conflicts with the permalinks, it's a parent category with the slug news
and the class of the page of the category is category-news
. What can cause this problem?
Topic template-hierarchy categories templates Wordpress
Category Web