I have a WordPress page with the slug contact
and a custom template file page-contact.php
The page-contact
template file is in a subdirectory of the child theme called page-templates
, but it won’t work unless I move it to the root of the child theme. There are other custom themes in the page-templates
folder that appear in the WordPress admin so I’m not sure why this template file won’t work there.
in creating wordpress template based on wordrpess.org you must have
an opening PHP comment at the top of the file that states the templateâs name.
Example:
Another Sample: