• Hey there,

    I’ve made a archive page with the tutorial from the wordpress codex. All right, but when I click at a link in my archive like the year 2007, nothing happen. The URL will be changing, but I see the archive page one more time without changes. Must there be a loop or something?

Viewing 11 replies - 1 through 11 (of 11 total)
  • You misunderstood the archive.php and archives.php

    The first one (singular) is a template file to disply your monthly and category archives/lists.
    The second one (plural) is a Page template and it will display whatever you put into the template file.

    Clicking on a year or month or day or category name –> is using the first one, not your Page.

    Thread Starter nachtmeister

    (@nachtmeister)

    hmm… I don’t understand. I’ve made a php file with the content for the archive page which I can set as the Template of any page. After that, i can get my archive over permalink like page.com/archive. This works, but when I click on any link of my archive, nothing will happen.

    Did I forget a file to make my archive working?

    I got my code from the kubrik theme, I think, it should work. But it doesnt.

    OK, let’s try it again. And give a link if you want more help!

    Did you create a new, empty Page using that “archives.php” template?
    Show me, where is it?
    And what links are on it and what do you expect to happen when you click on them?

    Thread Starter nachtmeister

    (@nachtmeister)

    https://www.6pounder.com/four/archives/

    have a look at it.

    I have a archive.php with my layout and code from kubrik theme, and of course this one: …

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

    It didn’t work. So I’ve made a copy of the archives.php from kubrik theme in my template folder.

    But It didn’t work better…

    I have a archive.php with my layout and code from kubrik theme, and of course this one: …

    THAT is the problem. You should read again more carefully my first reply!
    archive.php is NOT and should not be a Page template. Period.

    Thread Starter nachtmeister

    (@nachtmeister)

    hmm… ok, let’s change this. I only copyied the tings from kubrik. I tought, that should work.

    So what have to be in my archive.php (after that, archives.php, is my template.)

    Delete whatever you messed up and take a look at the archive.php and archives.php in the default theme (Kubrick). They are not the same and they are not interchangeable.
    All the time you were putting the wrong code in the wrong template file.

    You were copying the code from archiveS.php from K. and putting it into archive.php. Big mistake! File names are important.

    Thread Starter nachtmeister

    (@nachtmeister)

    Hmm. I’m sure, I’ve made it correctly. But you know more than me so i trust in your know-how ?? Thanks

    Thread Starter nachtmeister

    (@nachtmeister)

    It works dude. You are right.

    Other question by the way: Which file is now the right one to change the view of my archive page? I won’t make the same mistake ??

    Depending what do you call “archive page”. If it’s a Page created under Write > Page and selecting the whatever template for it – that should be archives.php, which MUST be a Page template.

    If you need to change how the posts are listed/shown in the monthly archives (when clicking on a month name) or category archives (when clicking on a category name) – that is displayed by the archive.php.

    Good reading: Template_Hierarchy.

    Thread Starter nachtmeister

    (@nachtmeister)

    Thanks. I think, this should help me anyway.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Archive, but nothing happen’ is closed to new replies.