• snakesmaster

    (@snakesmaster)


    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?

Viewing 7 replies - 1 through 7 (of 7 total)
  • moshu

    (@moshu)

    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.

    Thread Starter snakesmaster

    (@snakesmaster)

    I don’t see the page template option ??

    moshu

    (@moshu)

    Then check your theme:
    – if there is a page.php template file in it – create an archives.php template > https://codex.www.ads-software.com/Pages#Page_Templates
    – if there isn’t a page.php file > create both: page.php and archives.php

    Truth

    (@truth)

    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.

    moshu

    (@moshu)

    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!

    Thread Starter snakesmaster

    (@snakesmaster)

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

    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:
    https://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: https://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: https://www.transycan.net/blogtest/2006/04/
    a Category: https://www.transycan.net/blogtest/cat/blog-stuff/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Page Template’ is closed to new replies.