Create a new template for twentytwelve

Twenty Twelve comes with some page templates: Front Page & Full Width. These are in the folder /page-templates.

I’ve created my own template and saved it into this folder, but it is not present to be selected when editing a page.

Read More

There is no mention of the two page templates in functions.php

What do I need to do to include my new page template?

Related posts

Leave a Reply

2 comments

  1. Put the template file in your theme and add the following comment to the top of your file after the

    /**
     * Template Name: This is the name of your template
     */
    

    WordPress will pick this up and in the page templates dropdown you will see “This is the name of your template” listed as an option

  2. According to http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

    what you need to place at the top of the template file is

    <?php
    /*
    Template Name: My Template File
    */
    ?>
    

    and then the template will show up in the Template drop down in Page Attributes meta box and you’ll be able to select it.

    And, you should be working with a child theme, too, in order to not lose your changes and templates when twentyeleven is updated. See http://codex.wordpress.org/Child_Themes