I know how to create a custom template for a specific wordpress page. However, I would like to create a template for a specific custom post type. Is that possible and if it is possible, how can I do that?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To add a custom template for custom post types you can use
single-{posttype}.phptemplate. You can look at the template hierarchy diagram for more details.For example if your post type is called
books, your filename for the template should besingle-books.php