Single post template for a specific category
-
Back in 2016 I made some changes to my template, so that I can accommodate 2 different post templates for different categories:
– single.php template was used for most of my posts, that were in standard categories
– single-catID.php template was used for specific category where I wanted to display more information in a different manner.At that time, I had only one category that was different, with ID=5, so my custom template is single-5.php. Everything was working fine and still works fine for that category.
NOW, I need to create the same template as single-5.php, but for another category with ID=2310. So I made a copy of the file and renamed it as single-2310.php expecting that all the posts is that category will display as the custom template.
BUT, it’s not working anymore. I know that since WordPress 4.4 some changes occurred in file hierarchy… and I am puzzled now. Why the old template still works and if I create a copy today, is not working anymore?
How can I solve this problem quickly?
The topic ‘Single post template for a specific category’ is closed to new replies.