How do I ‘reroute’ a ‘Questions’ category post page to a new/customized single.php and comments.php page (I’m renaming it singlequestion.php/singlequestioncomments.php after editing)
Usage:
I’m adding the Question and Answer Forum plugin and need to customize a couple of things.
From the home page, the user can click on the ‘QA’ link which takes them to a ‘page’ that has the QA form. From there, they post their question and I go in and approve it as a post, tag it as ‘question’ category, publish it and respond in the comments section as the ‘answer’.
I also need to change the words ‘comments’ and submit ‘comment’ to read: Answers/Submit Answer on the post page w/ the answers.
Duplicate your existing single.php template file, call it single-post.php. Make a file for your questions category, called single-question.php
In single.php you do the logic to see if the current post is within your category. Like below:
You need to change X in in_category(‘X’) to be the numerical ID of your questions category.