WordPress.org

Forums

Nicer Archives Error (14 posts)

  1. cherub143
    Member
    Posted 10 years ago #

    I'm using this plugin for nicer achives:

    Archives by Date for WP 1.2.2
    Based on Sortable Nicer Archives by Laughing Lizard
    http://weblogtoolscollection.com/archives/2004/10/28/nicer-archives-for-wp13/

    This removes all options, simply displaying archives by Month.
    Modification by Podz
    http://www.tamba2.org.uk/T2

    BUT! It doesn't work the way it's supposed to. It just lists the first 4 posts, not all the archives. Why? Can someone please help me. Much appreciated =)

    And the really wrong archives are here:
    http://forever.cherub-wings.net/index.php?archives

  2. Mark (podz)
    Support Maven
    Posted 10 years ago #

    That's a very strange url to your archives using the file you mentioned. How is it implemented ?

  3. cherub143
    Member
    Posted 10 years ago #

    I use php inclusion here:
    http://www.xentrik.net/php/querystring.php

    So do you know what's wrong? :(

  4. philpeeps
    Member
    Posted 10 years ago #

    The problem might be that on your archives page <?php $posts_per_page = "-1"; ?> needs to be called before the require("./wp-blog-header.php");

    That fixed a similar problem of mine...it has to do with the order that it sets the variables. Let me guess, your blog is set to show only the last 4 posts on the front page?

  5. cherub143
    Member
    Posted 10 years ago #

    Yes. That's exactly the problem. Only the first 4 posts are shown! How exactly do you fix the problem?

    Because my $posts_per_page = '-1'; is before the require_once ('wp-blog-header.php');

  6. philpeeps
    Member
    Posted 10 years ago #

    Maybe try moving it after. Like I said, I think it has to do with the order that the variables are stored. That is what mixed my problem, but maybe the reverse will fix yours...

  7. cherub143
    Member
    Posted 10 years ago #

    Can you please paste a portion of your php file if it wouldn't be too much trouble. :)

  8. philpeeps
    Member
    Posted 10 years ago #

    http://www.philpeeps.com/wp/archives.txt

    Note that it is on a static page utilizing a top and bottom file for header and menu code as discussed on this link...

    http://www.tamba2.org.uk/wordpress/static/

  9. philpeeps
    Member
    Posted 10 years ago #

    have you tried any changes based on my file? It doesn't look like it as my code displays the exceprts on the archives pages....

    good luck!

  10. AmyC
    Member
    Posted 10 years ago #

    For months and months, I've been having the same problem as the original poster and I just wanted to say thanks philpeeps. Your tip finally fixed my problem (I can stop trying to tear out my hair now...).

    Thanks again!

  11. philpeeps
    Member
    Posted 10 years ago #

    No problem at all! I dug for quite a while to figure it out as well!!!

  12. puppy18
    Member
    Posted 10 years ago #

    I have tried to place that -1 thingie before and after my require blog-header thingie and it still doesnt solve the date archive problem :(.

    Category runs just fine but there's only one 'Archive' link when date is selected for sorting.

    Here's the link: http://alvinwoon.com/blog/index.php?page_id=151

    For some reason it also duplicated some words from below.

    Pls advise. THanks.

  13. Lorelle
    Member
    Posted 10 years ago #

    Just to clarify this on this discussion - in order to show ALL the posts independent of the sort order, this must be in the top of the narchives.php file.

    <?php
    /* Don't remove this line.
    Add $posts line in this position to make this work. */
    $posts_per_page = '-1';
    require('./wp-blog-header.php');
    include(get_template_directory() . '/header.php');
    ?>

    Change the name of the last line as header.php to whatever your header template file name is within your Theme.

    Works like a charm in v1.5 now!

  14. Glo
    Member
    Posted 10 years ago #

    Perfect fix, Lorelle! Except I had to add the footer.php page at the bottom.

    <?php
    include(get_template_directory() . '/footer.php');
    ?>

    It can go inside just before the ?> at the bottom but I used a div outside of the archives code for design purposes.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.