• I had copied the index.html to homepage.php and at the top of the page I added <?php /* Template Name: Home Page */ ?>.
    I then copied the template to wp-content/themes/default on the server.

    I signed on to wordpress and clicked to Pages in Dashboard. Clicked the add Page, put in Home Page in the title and clicked the dropdown box in the “template” area under the “parent” section on the right.
    All that shows up is “default templates”, “archives” and “links”.
    No “Home Page”.

    Newbie question I know but I’m stick, please help…
    Thanks

Viewing 1 replies (of 1 total)
  • I don’t think that you can put the page template on a single line like that, it has to be formatted just like it is in the documentation.

    I would suggest that rather than trying to create a page template from scratch, you copy one of the existing ones.

    Try making a copy of the links.php file, and renaming it to page_home.php. Then open that in your favorite text editor and rename, and change the template name to “Home” and the title to “Test” like this:

    <?php
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */
    
    /*
    Template Name: Home
    */
    ?>
    
    <?php get_header(); ?>
    
    <div id="content" class="widecolumn">
    
    <h2>Test</h2>
    <ul>
    <?php wp_list_bookmarks(); ?>
    </ul>
    
    </div>
    
    <?php get_footer(); ?>

    You should be able to see that in your page template options, and modify it from there. Even if you want to code the page completely from scratch, at the very least I’d include <?php wp_head(); ?> and <?php wp_footer(); ?> just in case you want them to interact with WordPress in some way.

Viewing 1 replies (of 1 total)

The topic ‘Custom Templates’ is closed to new replies.