WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Associating theme files to a 'Page' (5 posts)

  1. colincameron
    Member
    Posted 8 years ago #

    In WordPress 1.5 you could create a archive page for example and associate it with a theme file using the following method.

    Under Custom Fields, select _wp_page_template from the dropdown. Leave the Key field blank, and enter archives.php into the Value field.

    In WordPress 2 I dont see the option to select "_wp_page_template" any ideas? Or is there a different way to get "archives" to show up under the wp_list_pages function.

    Thanks

  2. moshu
    Member
    Posted 8 years ago #

    Why not choose it in the Page Templates section? (BTW, that was the "normal" way even in 1.5)
    more: Pages#Page_Templates

  3. colincameron
    Member
    Posted 8 years ago #

    Thanks for the quick response, I must be looking in the wrong place "Page Templates" does not show up on my "write page" page. I have a archives.php file in my theme directory so according to the codex it should be there?..

    Thanks again.

  4. moshu
    Member
    Posted 8 years ago #

    Yes. Usually it shows up only if you have a default (=page.php) template AND another one.
    Then you'll have a dropdown menu to pick the Page template you want to use. In some themes I've made there were 6-7 Page templates. So, I know it works.

  5. colincameron
    Member
    Posted 8 years ago #

    Ok I figured it out. I didn't declare a template name at the top of the file. Im not sure why I was using the other method before.

    Thanks again!

Topic Closed

This topic has been closed to new replies.

About this Topic