Support » Fixing WordPress » Simple master archive?

  • I’ve tried out two of the archives hacks (MtDewVirus and CoderGurl) and both of them work great, but I want something much more simple. I simply want one master archive page (archive.php) to display all of my entries like this:
    February 2004
    03 – Test entry 6
    19 – Test entry 5
    30 – Test entry 4
    January 2004
    05 – Test entry 3
    17 – Test entry 2
    28 – Test entry 1
    Just a list like that, no links to the month or year or date… just links to each entry’s permalink. And I can’t figure out how to do it, nor can I figure out how to modify the hacks to make them look like that. I am a WP newbie but I’m just stumped. 🙁 Could anyone point me in the right direction?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Do my master archives look right to you?
    If it does, please let me know and I will either post the source or send you the file.

    Nicely done, but two things went wrong(?):
    I’m wondering about the order of your entries
    »—–› … L M N O P Q R S T U V W Y Z L S ?!
    Selecting another author than Mark (or All A.) results in »pretty typo stuff«…

    I fixed it to accept cleaner urls. You dont see “permalinks” on my blog because I do not use permalinks. If you like the way it looks, you can download the file here:
    Copy this file to the root of your blog, rename it to narchives.php (or something equivalent with a .php at the end instead of the .phps) and then point your browser to it.

    Thanks so much! 🙂 I’m trying it out now, fingers crossed that it’ll work. I appreciate your help. 🙂

    @webicus: The problem with the alphabetical sorting is my blog goofing off (and some laziness on my part). Those posts have titles which are in lower case and thus show up at the end when sorted by link name. You could add something like
    $new_string = msql_regcase($string); to wp-blog-header.php which would do a case insensitive order_by.
    As for the authors, only mark has any posts, the others have none. The new versions of WordPress (1.0.1+ I think) has nice checks for empty authors and post requests. My blog simply errors out (with extreme verbosity) when it finds no posts. If you notice, the errors are coming from wp-blog-header.php.
    PS: A disclaimer. I do not claim all of this to be my code. I have peiced this together from stuff done by CodeGurl, MtDew and others. So thanks to all of you. 🙂

    LaughingLizard: I’ve just tried your “narchives” and liked it.
    One problem: it shows ONLY 12 rows of data – as is my ‘posts_per_page’ value. The initial value of this var is set in your hack as -1 but it doesn’t matter. I tried to change this value but, again, no change.
    Any idea?

    @anavy: It really should work with the posts_per_page setting in the hack file. I have tested it with 1.0, 1.0.1 and 1.1 Alpha. Wha version are you using? Is there anything else different about your blog (such as other hacks) ?

    LaughingLizard: I’m using Ver 1.01 and wp-grins is the only hack installed for now.
    funny, when I pass “?posts_per_page=-1” in the URL box, it works fine, but it ignores this var that is embedded in the code… The same happens if I include the hack file or run it as a standalone.

    OK, I had a problem – not noticing that “require_once(‘wp-blog-header.php’);” was loaded BEFORE the hack file, so posts_per_page was already processed… All is fine now, sorry for the trouble (:

    🙂 Glad it worked out for you!

    Any way to add “month” to the sort by along with “Date” “Title” and “Category” so you can list the posts by month along with the year??

    Ack. For some reason if I choose the “all years” option it’s not listing all the entries. Just the first month, or category, etc. Any ideas on why?

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Simple master archive?’ is closed to new replies.