This must be a very amateurish question but...

I'm using page templates from the dropdown menu in page editor but I can't find their source code. I know that usually this can be found in themes/"theme name"/page-templates, but no matter how hard I look, I just can't find the files for several of the templates I'm using ("Full-Width Template", "Page with Navigation Only" etc.). Any tips?

Thanks a lot!

  • This really depends on the theme you are using. You could take a look in the functions.php file. – cjbj Mar 31 at 15:58
  • Ok, but I should be able to find the template name inside functions.php, right? Otherwise it wouldn't show up in the dropdown menu. I did search through my functions.php, but it's not there either... – Kristýna Šulcová Mar 31 at 17:21
  • Yes, the template name should show up somewhere, but there is not necessarily a file with a template. It may also be generated programmatically. You may even have a plugin that does this. – cjbj Mar 31 at 19:08

You can simply right click on your Template Select on the edit page, Inspect Element (on Chrome) then you can check the different options in the select like "page-template.php" as value and find your template file. :)

<select id="inspector-select-control-0" class="components-select-control__input">
    <option value="">Default</option>
    <option value="page-my-account.php">My Account</option>

It should look like this with your own templates.

| improve this answer | |

I suggest you to download the starter theme from Underscores.me

Once you download it will you get a complete structure of a custom theme with all files available and sample code in it. It is just like a prototype. It helps you a lot and give you best understanding.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.