Answer the question
In order to leave comments, you need to log in
How to make a page template in Wordpress (what's wrong)?
Tell me, there is a custom post type staty, I created a template in the theme folder and added the code
<?php
/*
* Template Name: Page for the article
* Template Post Type: staty
*/
?>
as a result, I can use the template for the article, but it is not displayed (everywhere the transition to the main page), tell me what's the trouble? the url site.name/staty/statya-1 is formed, but the main page of the site opens after the transition.
Two or three days ago I did exactly the same operations with another category of records, it works there, but here I do it by analogy - no.
Answer the question
In order to leave comments, you need to log in
Hello!
No code needed. If you need a template for a custom post type, just name it properly
single-staty.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question