WordPress.org

Ready to get started?Download WordPress

Forums

Custom Page Template not recognized (5 posts)

  1. pdxchambers
    Member
    Posted 3 years ago #

    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.

  2. esmi
    Theme Diva & Forum Moderator
    Posted 3 years ago #

    Trry using:

    <?php
     /*
       Template Name: Custom Template
     */
    ?>
  3. pdxchambers
    Member
    Posted 3 years ago #

    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.

  4. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    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)

  5. pdxchambers
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic