I've got a template called News
.
When I go to the Dashboard and edit the Page called News
which has a web address of news.html
I can see it uses this template (i.e. in the Page Attributes > Template section).
However, if I then update the Template Name (i.e. in page-news.php
) to something like NewsTest
and refresh the News Page in the Dashboard I see that WordPress has updated the Template being used in the Page Attributes > Template section.
Here's another more specific example:
If I then edit the slug to newsaaa
and the template name to Newsbbb
it still shows up in the Page Attributes > Template section.
I have been working my way through the Template Hierarchy but am still a bit puzzled how exactly WordPress knows which file it should use for that Page.
Can anyone shed some light?