WordPress.org

Support

Support » Themes and Templates » Custom Page Template not recognized

Custom Page Template not recognized

  • pdxchambers
    Participant

    @pdxchambers

    I have a feeling this is something simple that I’m over looking, but I can’t get WordPress to “see” the custom page template I created. If I understand the process correctly I just need to add the following to the top of the template file (customTemplate.php for example):

    <?php
     /*
       Template Name: customTemplate
     */
    ?>

    Once that’s done I should be able to select the custom template when I create a new page. Problem is that my template has that code in it but no option to select it when I create the page I want to apply it to. I’m using WP 3.04… am I missing a step somewhere? I used the same technique on a previous theme under an earlier version of WP and didn’t have any problems.

Viewing 4 replies - 1 through 4 (of 4 total)
  • esmi
    Forum Moderator

    @esmi

    Trry using:

    <?php
     /*
       Template Name: Custom Template
     */
    ?>
    pdxchambers
    Participant

    @pdxchambers

    Thanks for the reply… tried adding the space but still no go. Upgraded my test box to WP 3.05 thinking maybe the issue was a bug that got fixed. The actual code at the top at this point is:

    <?php
    /*
    Template Name: Home Page
    */
    get_header(); ?>

    I did try moving the get_header() call to a separate line in the off chance that was what was throwing things off, but still no go.

    Michael
    Forum Moderator

    @alchymyth

    is that template saved alongside all the other template files of your theme?
    (i.e. for instance in the place /wp-content/themes/yourtheme/customTemplate.php)

    pdxchambers
    Participant

    @pdxchambers

    Yes… the file name is homepage.php… not sure if that matters, but it does sit in the root of my theme’s directory alongside index.php, header.php, etc.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom Page Template not recognized’ is closed to new replies.