WordPress.org

Forums

Pages using different template (8 posts)

  1. snakerboy
    Member
    Posted 10 years ago #

    Hello, I'm having a slight issue with my custom pages. Im trying to setup a few different templates to use for an about page, portfolio etc

    I have just read: http://codex.wordpress.org/Pages#Pages_can_use_Different_Templates

    I found:

    "WordPress can be configured to use different Templates for different Pages. Toward the bottom of the Write->Write Page administration panel is a drop-down labeled "Page Template". From there you can select which Template will be used when displaying this particular Page."

    I don't see a dropdown named Page Template, I'm not going blind but it really isnt there.

    Anyone got any idea?

  2. jennmiller
    Member
    Posted 10 years ago #

    It's in the "Custom Fields" box, but I'm just figuring out how to use it myself.

  3. Cyndy Otty
    Member
    Posted 10 years ago #

    On the "Write Page" page - scroll down to Page Options, the dropdown is the first thing there.

    And, for the record, I am blind - and I see it. ;)

  4. Minna
    Member
    Posted 10 years ago #

    jennmiller, you have to have templates ready to get them in the dropdown list. You put
    <?php
    /*
    Template Name: My template
    */
    ?>

    at the beginning of a php file and then write how you want the page to appear (functions, plain text, html, the usual).

    Oh, and you'll probably want <?php get_header(); ?> at the very beginning (well, after the template name "declaration") and <?php get_footer(); ?> at the end, too

  5. jennmiller
    Member
    Posted 10 years ago #

    I wasn't quite sure where to put the new php file, but it's working for me in each of the theme folders. Thanks for the tip!

  6. snakerboy
    Member
    Posted 10 years ago #

    Minna, I guess if I dont have any templates Im not going to see the dropdown? oh and where do these templates files have to live?

  7. Minna
    Member
    Posted 10 years ago #

    At least that's what I noticed. Before I made a template, there wasn't the "corrent" drop down (as jennmiller noted, there is a custom field for templates in *that* drop down).

    Anyway, you put the templates in the theme folder (preferably of the activated theme :) ) where you have headers and footers and singles and things (if you do)

  8. snakerboy
    Member
    Posted 10 years ago #

    Righto Minna, thanks for your help. The codex was helpful, but it didn't half throw me off.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.