Sub-Category templates not working when no /category/ base slug used
-
I am using categories and sub-categories to organize my content and use a %category%%post-name% permalink structure. This means that a typical url for a post in a sub-category is: site.com/category/category1/subcategory1/postname . Since my url’s are longer then I would like with this type of url structure, I removed the /category/ category base slug (not the %category% from the permalink url) from the URL via the permalink settings page to get a typical subcategory url of site.com/category1/subcategory1/postname/ (notice the /category/ immediately after site.com/ is no longer present as is the case with any category when /catgeory base is used). This has created the following issue: my categories utilize my category.php template, but my sub-categories do not, they use the index.php template….. this means that sub-categories are not excerpts as they would be if they used my category template, among other changes that I have implemented in my category template……. this issue goes away if I simply add back the /category/ category base to my url structure, but this means my already long url’s get even longer…. example: https://www.site.com/category/category1/subcategory1/nameofppost/ as opposed to https://www.site.com/category1/subcategory1/nameofppost/
Any feedback appreciated!
- The topic ‘Sub-Category templates not working when no /category/ base slug used’ is closed to new replies.