Clean Archives Reloaded

What Exactly Does This Plugin Do?

It creates a pretty list of all of the posts that you’ve made to your blog. To see an example, check out my archives page. Note that the image located there that shows the post times of recent posts is generated by a seperate plugin.


Support / Feature Request Forum:

Credits / History:

This plugin is based on a concept (it no longer shares any common code) by Sebastian Schmieg for the archive page of his “Blix” theme. His code was later converted to a plugin by Shawn Grimes.

The drawback of both of those versions though was the sheer number of queries required (around 1 per month + 2 per post — it added up quick). So, I decided to make my own version which cached the output so that it was only regenerated when needed and otherwise just pulled with 1 query from the database. I was also given the idea by Chris O’Rourke to use Javascript to make the months collapsible as many people’s archives pages were getting rather long.

All of that was then replaced by the current version which uses WordPress functions and internal WordPress caching techniques to make only one query per page period.

780 thoughts on “Clean Archives Reloaded

  1. Pingback: ???????? | D?

  2. Pingback: Create a Blog |

  3. It’s not working. Seems like, I am doing something wrong.

    I have edited 404.php page and deleting 404 text written there, I have pasted your given code. 🙁

    Your plugin is activated and awesomely working on Archives Page.

  4. I LOVE this plugin, but I just upgraded to the newest version of WP (3.3.1) and then noticed that the “expand all” and “collapse all” functions stopped working. Will you be updating the plug-in or is there a quick fix with the code that you can offer…? Would really appreciate it!

  5. I’ve noticed that the program archives don’t show the author or the categorization of any WordPress post. Is there any alteration to the code that can allow this? Thanks

  6. This plugin is precisely what I was looking for. Although, it doesn’t seem to be working with WordPress 3.3. Any chance an update is coming?


      • I apologize, I was able to get it working (I had another archive plugin activated and they were not playing nice together). Once I realized this, I deactivated the other plugin, reactivated this one, and voila! I came back here to delete my comment but couldn’t 😉

        Thanks, great work!

  7. Pingback: Lindsay Loves » WP Archive Plugins

  8. Pingback: Kennt ihr gute Archiv-Plugins für Wordpress? | Lordys Weblog

  9. Pingback: dupothem for WordPress????????? WordPress ? - ??

  10. Pingback: dupothem for WordPress????????? WordPress ? - ???? - ????????????

  11. Let me begin by saying thank you for a great plugin.

    I really like this plugin and because of this, I spent a bit of time looking through the code to see if I could tweak it just a bit. I am not a coder so take what I’ve done with a large grain of skepticism.

    As I looked through the code, I realized that most of what I wanted was already there, just not documented anywhere that I could find. I am able to show/hide the post count and comment count values using the shortcode without any changes to the current coding of the plugin, which is version 3.2.0 on WP 3.3.1, using a TwentyEleven child theme. A value of ‘1’ will show the information. A value of ‘0’ will hide the information.

    [cleanarchivesreloaded postcount='1' postdate='0' commentcount='0'] 

    I also wanted the ability to show/hide the post date value, so it could be shown/hidden using the shortcode as seen above, and for that I had to make a few minor changes.

    Please excuse me if my terminology isn’t correct. As I said, I am not a coder and anyone using my changes does so at their own risk.

    First I added a value to allow the postdate attribute on line 245.

    'postdate'     => '1', 

    Then I had to change this line, which I believe is line 288.

    $html .= '			<li>' .  mysql2date( 'd', $post->post_date ) . ': <a href="' . get_permalink( $post->ID ) . '">' . get_the_title( $post->ID ) . '</a>'; 

    To make the postdate attribute work, I needed to break out the li, post date, and post title, and then add the check which would allow it to shown or hidden. This is what I came up with.

    $html .= "			<li>";
    if ( '0' != $atts['postdate'] ) $html .= mysql2date('d', $post->post_date ) . ":";
    $html .= ' <a href="' . get_permalink( $post->ID ) . '">' . get_the_title( $post->ID ) . '</a>';

    Now the postdate attribute for the shortcode is working for both a page and when added to the sidebar on my test site.

    Hope this is helpful.

  12. I work for a news website and we use Clean Archives Reloaded as our default archives page. I love the functionality and how easy it is to use.

    It stopped working in the last couple of days, and I talked to our server tech about it. He said that the plugin takes a ton of memory — more than the default that WordPress allows. He increased our memory so it can work, but it makes our site on the whole less stable.

    Is there anything we can do to optimize the plugin? (Or is there a more optimized version out there?) We’ve got somewhere in the neighborhood of 2,000 posts, and we’re adding several more each day (about 3-6 daily).


  13. Pingback: ????????? | ???????

  14. Pingback: Setting up a Blog Easily - Part 3 | Online Freelancer

  15. How might I modify the code so that I can exclude posts from a certain category in my archives? Thank you so much, if anyone can help me. I’m using Version 3.2.0

    • You would have to replace this line in the plugin:

      $rawposts = $wpdb->get_results( "SELECT ID, post_date, post_date_gmt, comment_status, comment_count FROM $wpdb->posts WHERE post_status = 'publish' AND post_type = 'post' AND post_password = ''" );

      With something like this:

      $rawposts = get_posts( array( 'numberposts' => -1, 'category' => '-123' ) );

      That would exclude category ID “123”. However it’s going to cause the plugin to use more memory probably.

      On a side note, I strongly recommend you never run an old version of WordPress. Do yourself and upgrade to the latest version ASAP. Lots of great features but more importantly, each version of WordPress is more secure than the last. I don’t believe there are any major security issues with v3.2 but you should still upgrade. 🙂

      • Thanks for the speedy update, Alex!

        Oh no, my reference to the version number was your plugin, not WordPress itself! I am up-to-date with WP versions. 😀 It’s really awesome that you care about your readers though 🙂

  16. Awesome plugin, Alex!

    Just one question: how can I hide/remove the numbers in parenthesis?

    So, instead of looking like this:

    April 2012 (3)
    – Random Title (1)
    – Other Post (0)
    – And Yet Another One (9)

    It looks:

    April 2012
    – Random Title
    – Other Post
    – And Yet Another One


  17. I’ve been using this plugin for a long time and it works great. Just wondering if there is a way to unhook the js and css except for one page, like I found for Contact Form 7:

    Removes CF7 js and css except for on page ID 100:

    add_action( 'wp_print_scripts', 'deregister_cf7_javascript', 100 );
    function deregister_cf7_javascript() {
        if ( !is_page(100) ) {
            wp_deregister_script( 'contact-form-7' );
    add_action( 'wp_print_styles', 'deregister_cf7_styles', 100 );
    function deregister_cf7_styles() {
        if ( !is_page(100) ) {
            wp_deregister_style( 'contact-form-7' );
  18. Pingback: Wordpress bilogunuz » Clean Archives Reloaded

  19. Pingback: ????????… | ???????

  20. Hi, I’m a newbie and I’d like to use your plugin… so I have to type in: [cleanarchivesreloaded] where I want the archive to appear in the .php page? Do I have to put it between tags: ? I’m confused, sorry my question is so basic and thanks a head of time for any help…

  21. Pingback: Wp Clean Archives Reloaded eklentisi | Tuncay Demir Blog

  22. Pingback: Clean Archives Reloaded

  23. Pingback: ??? ???? ?????? ????? ????? | ????? ??????

  24. Pingback: ??? ???? ?????? ????? ????? » ???? ??????

  25. Pingback: ??? ???? ?????? ????? ????? – Sage-Computers ,inc

  26. Pingback: ??? ???? ?????? ????? ????? « ????? ???????

  27. Pingback: ??? ???? ?????? ????? ????? | ?????????

  28. Pingback: ??? ???? ?????? ????? ?????

  29. Pingback: ????????? - ?????

  30. Pingback: ??? ???? ?????? ???? ???? ! – ???? ???????? ?????

  31. Pingback: ??? ???? ?????? ???? ???? ! – ??? ???? ???

  32. Pingback: ??? ???? ?????? ???? ???? ! | ???? ???????? ?????

  33. Hi Alex,

    first of all i want to thank for the great plugin and also want to suggest something. What do you think of implementing a page navigation for example when the “Clean Archives Reloaded” page achieve 50 lines ? Do you undertand what i mean ?

  34. Pingback: 10 pages every small business blog should have - Erno Hannink

  35. Pingback: » ??? ???? ?????? ????? ????? ???? mido

  36. Pingback: ????????: RunPHP » ?????????????

  37. Pingback: How To Create A Profitable Blog |

  38. Pingback: ????? ????? ????? ???? ????? | ???? ??

Comments are closed.