Custom single post template for specific category
-
Hello,
I would like to use a custom single post template for a specific category and am having a little trouble. My template file is not being recognized and continues to use the default template file. Purpose: show a default category image as the featured image for single posts in a specific category.
I am using a child theme and attempting to keep everything as simple and straightforward as possible with the least amount of changes. I do have a custom single-tmpl file in the child folder and it’s worked very well (needed feat. images on the single post pages). I realize I can continue to edit single-tmpl to show either feat. img or my fallback category image (this is working well so far) but for further customizations, I would like the category to have it’s own custom single post template, if possible. The basic code doesn’t seem to work with Hueman.
The single-tmpl adjustment only required a simple file edit, but for custom templates, I’ve had to add a filter in functions.php, create a new template, then call my custom tmpl file from inside that template, and this is where it gets tricky and the file is not recognized (the code inside the custom tmpl file itself has not been an issue). Is there a special file naming format for additional template files? Or better yet, a simpler way to tackle this altogether?
Thank you for your time.
- The topic ‘Custom single post template for specific category’ is closed to new replies.