WordPress.org

Ready to get started?Download WordPress

Forums

Page Template (8 posts)

  1. snakesmaster
    Member
    Posted 7 years ago #

    I try to do this to create an archive index: Just go to Write > Write Page and from the Page Template dropdown select "Archives".

    But I don't see this optin. Why?

  2. moshu
    Member
    Posted 7 years ago #

    You don't see the Archives option or you don't see the Page templates option?

    Either way it measn you do NOT have a template called "Archives"; the Templates options doesn't show up at all if youo don't have more than 1 (the default page.php) Page templates.

  3. snakesmaster
    Member
    Posted 7 years ago #

    I don't see the page template option :(

  4. moshu
    Member
    Posted 7 years ago #

    Then check your theme:
    - if there is a page.php template file in it - create an archives.php template > http://codex.wordpress.org/Pages#Page_Templates
    - if there isn't a page.php file > create both: page.php and archives.php

  5. Truth
    Member
    Posted 7 years ago #

    If there are no templates at all, you won't see the page template options as what moshu said, you need to upload an archive.php to the themes folder to get that option. I thought this might help.

  6. moshu
    Member
    Posted 7 years ago #

    you need to upload an archive.php

    WRONG! That's the template file to display monthly and category archives! The proper Page template for archives is archiveS.php - notice the S at the end!

  7. snakesmaster
    Member
    Posted 7 years ago #

    Thanks guys, now it's working. I miss the page.php file. What I don't understand why I need the archives.php file???

  8. moshu
    Member
    Posted 7 years ago #

    As it is stated in your OP (original post) - archives.php is supposed to be a Page Template, and you can use in it different template tags (or, eventually, plugin tags) to display a kind of "index" of your arhived posts.
    Let me give you an example of my testbed:
    This is a Page made by using the archives.php template file:
    http://www.transycan.net/blogtest/archives/
    - this one is using the very basic template tags
    [and this is an example of archives.php using a plugin: http://crosscultural.transycan.net/blog/archives/ ]

    On the other hand, there is also an archive.php template file that is used by WP to display monthly and category archives when clicked on month or cat names, e.g.
    April 2006: http://www.transycan.net/blogtest/2006/04/
    a Category: http://www.transycan.net/blogtest/cat/blog-stuff/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.