Support » Themes and Templates » Problems creating archive page with WP 2.2

  • Resolved lineageescape

    (@lineageescape)


    Hey guys (and gals)!

    I’m building a theme from scratch and I am having troubles on getting the archive index to work.

    I created an archive.php and wrote and styled it. I could see it when clicking on a category because I didn’t create any category.php or date.php as of yet.

    I want to link to it, but I don’t find the link. So I decided to “create and archive index” as it is written in the Codex (here: http://codex.wordpress.org/Creating_an_Archive_Index). Since I don’t have any pages template box I used the Custom Fields.

    However, _wp_page_template is not present in the dropdown menu.

    What should I do?

Viewing 6 replies - 1 through 6 (of 6 total)
  • 1. I want to link to it, but I don’t find the link.
    You never link directly to any of the template files. Never.

    2. In order to have the Page Template option to show up you need at least two [2] Page templates: the default page.php and one that you created.

    Hey,

    Thanks for the quick answer. I just checked, and in my theme folder I have:

    index.php
    single.php
    page.php
    archive.php

    So that should do it. No?

    No. Of course, not.
    Study the default theme.
    archive.php is NOT a Page template.
    archives.php (plural S at the end!) is a Page template!
    Alse:
    Template_Hierarchy
    Pages (see the templates section)

    Well,

    I created an archives.php page (pretty similar to archive.php) and… nothing. The option is still not showing up.

    Is that normal?

    I will read more into the links you gave me, thanks.

    (pretty similar to archive.php)
    That’s the problem.
    You do things BEFORE reading the offered resources. Don’t post back until you finish reading everything that was suggested.

    I read the links you suggested, and had nothing to change, besides:

    <?php
    /*
    Template Name: archives
    */
    ?>

    that I had done before.

    I solved my problem by switching to another theme and then getting back to my theme, which worked.

    Anyway, Thanks for the help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Problems creating archive page with WP 2.2’ is closed to new replies.