• Resolved fledgling42

    (@fledgling42)


    Hi there,

    I am trying to create my own WordPress theme and since I’m all new to it I am having some difficulties creating an archive index.

    Now, https://codex.www.ads-software.com/Creating_an_Archive_Index says that I should create the archives.php template, which I accordingly did. The next step, it says, is to create a page, and then:

    “In the sidebar open the Page templates box, and select the Archives template. After saving it you will see a new item in your pages list, click on it, and enjoy!”

    Well, there is no Page template box in my sidebar. Also, it says WP 1.5+ – so I’m wondering whether it is outdated or not.

    Is this the way to do it? Am I doing something wrong? Thank you for all the help in advance!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Did you save archives.php in your theme’s folder? Does it have these lines at the top?

    <?php
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */
    /*
    Template Name: Archives
    */
    ?>

    This approach is correct for all versions of WP 1.5 and up.

    Thread Starter fledgling42

    (@fledgling42)

    No, it doesn’t. Thanks for the help – but I still won’t find the “Page templates box”. What is that and where is supposed to be? Thank you so much!

    Go to Admin->Pages->Pages to see all of your pages. Click on Edit under the name of your archive page. In the right sidebar, you should see a dropdown for Template. Pick your Archives template and update the page.

    Thread Starter fledgling42

    (@fledgling42)

    All right. The problem was that I didn’t have that snippet of code at the top of the file – so WordPress didn’t recognize any page templates, and so it didn’t display that dropdown menu. No it does: thank you very much for helping.

    You are welcome!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Probelm creating an archive index’ is closed to new replies.