WordPress.org

Ready to get started?Download WordPress

Forums

Archives (16 posts)

  1. Anonymous
    Unregistered
    Posted 10 years ago #

    It'd be nice to have some way to list archives in this format below, all on one page. If this is possible then I'm overlooking how to do it in the docs somewhere.
    January 2004
    article1
    article2
    article3
    February 2004
    article1
    article2
    article3
    etc...
    So for example, someone could list all of 2004 on one page as seen above, or 2003, or all years.

  2. Beel
    Member
    Posted 10 years ago #

    It'd be nice if everyone did a search before posting ;-)
    http://dinki.mine.nu/weblog/b2-img/narchives.phps

  3. Anonymous
    Unregistered
    Posted 10 years ago #

    It be nice if there was a decent place to actually find mods/tweaks/etc for WordPress. As it is now they are scattered.
    A search on "archives" returns over 40 PAGES of messages.
    I just checked my sched and I just don't have time for that sort of non-sense.
    How about an organized, categorized, single location where this stuff can become located?
    Na. That makes to much sense. Must be something wrong there...

  4. Nick Momrik
    Member
    Posted 10 years ago #

  5. OperaManiac
    Member
    Posted 10 years ago #

    and wiki too has a search command btw which works perfectly.

  6. Anonymous
    Unregistered
    Posted 10 years ago #

    Somebody might want to mod the docs page to give some vague hint that the Wiki contains code mods since it doesn't mention so.
    This reminds me of an old joke:
    A man checks his mail and finds a letter offering him a great price on a set of encyclopedias. The man takes the letter and writes a response back: "Don't need. Wife knows everything."
    So I have to wonder if I really need Wiki. . .

  7. Anonymous
    Unregistered
    Posted 10 years ago #

    36

  8. Anonymous
    Unregistered
    Posted 10 years ago #

    On the Nice Archives, is there a way to have the default listing be the current year *only*? When you have two or three years worth with plenty postings, the list is quite large. Beel, Jesuit, anyone? ;-)

  9. Lilandra
    Member
    Posted 10 years ago #

    there probably is a way by calling the appropriate functions...

  10. Anonymous
    Unregistered
    Posted 10 years ago #

    Very helpful, Lilandra :-) There is a way, no doubt about it. What I want is to be shown the way! :-D

  11. unixman
    Member
    Posted 10 years ago #

    Does anyone has an answer for anonymous question? I would also like to do what he is trying to do...

  12. skippy
    Member
    Posted 10 years ago #

    It's a recognized shortcoming that the documentation is scattered and incomplete. Much effort has been dedicated toward creating a comprehensive User Manual. The influx of MT users has caught us all off-guard. Please be patient. We _do_ want to support new users.
    Regarding the archive by year: the archives are generated using the core WordPress wp_start() routine, and they override the default blog config by setting $posts_per_page = '-1';, which prevents pagination of output. To restrict default archive output to the current year, go to the "else" clause toward the bottom of the script. Find the line <?php if ($posts) { foreach ($posts as $post) { start_wp(); ?> and insert the following two lines just above it:
    <?php $year .= ' YEAR(post_date)=' . date('Y');
    $posts = $wpdb->get_results("SELECT * FROM $tableposts WHERE $year"); ?>

    That should do it.

  13. unixman
    Member
    Posted 10 years ago #

    Awesome SKippy!!! You are the best. Boy, I am having so much fun, it's not even funny! :-)

  14. Lilandra
    Member
    Posted 10 years ago #

    sorry i wasn't helpful...paper deadline...i can look at it later :-(

  15. Anonymous
    Unregistered
    Posted 10 years ago #

    Skippy figured things out. I placed the code over the wiki at:
    http://wiki.wordpress.org/index.php/NicerArchives

  16. Anonymous
    Unregistered
    Posted 10 years ago #

    You might want to check the output. I noticed that it lists draft posts... At least in my copy of the code it does.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.