1

I understand that to create a new page template, all I have to do is create my custom template (in this case, page-custom.php) file, and save it in wp-content/themes/mytheme/.

However, where can I access this newly created template file? I want to edit it now... but it does not show up the page editor's Page Attributes options as an available template to use.

This what I see on the page editor:

enter image description here

My newly created page-custom template isn't there. How can I make it appear as an option under Templates?

2

May be something is wrong on your page template file. Have your added page template name at top of the page like this:

<?php
/*
Template Name: My Custom Page
*/

Try with this and check once again. You can check WordPress document for creating custom page template. Check this link: Page Templates

1

According to the Codex, your custom page template must have a header containing the name of the template. All page templates must be named in this way, or they will not appear in the "Template" dropdown. Here's an example, make sure your custom template has a header in this format:

<?php
/*
Template Name: My Custom Page
*/

// Your custom page template code goes here

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.