Dropdown Archives Widget for WordPress

This widget displays your WordPress archive as a dropdown menu. It supports dates, categories, and tags (if UTW is installed). Dates can either be shown in the default WP format, or in a hierarchy. The widget title may be left blank to display the menu without a title. To see what this looks like in action (showing dates in a hierarchy and categories) take a look at the bottom of this page. To install, just toss dropdown-archive.php into your wp-content/plugins directory, activate the plugin, and add the widget to your sidebar.

27 Comments (comment feed)

  1. October 30, 2006; 5:02 am Permalink

    Excellent plugin. I am implementing it in my blog. The only problema that I am havind is that I can not write the title. Any hint?

  2. October 30, 2006; 5:28 am Permalink

    Don’t worry. The problem was resolved. Any plan for a drop-down links?

  3. October 31, 2006; 10:35 pm Permalink

    Attempted to use this plugin, but nothing shows up in the widget staging area. The plugin shows as activated, but I’m not seeing the widget itself available.

    Are there any plugins or widgets yours doesn’t play well with? Can’t figure out what might be the problem.

  4. November 2, 2006; 9:11 am Permalink

    I tried to install this plugin, but when I upload it to the plugins directory, it doesn’t appear on the plugins list.

  5. November 2, 2006; 2:14 pm Permalink

    Any plans for supporting hierarchy in categories? (category>subcategory) Thank you!

  6. November 5, 2006; 1:17 pm Permalink

    When I install it I get an error at the top of my blog:

    Warning: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, ‘widget_archive_drop_js’ was given in /home/*****/public_html/wp_blog/wp-includes/functions.php on line 1329

    (***** = removed for security purposes)

  7. November 9, 2006; 6:32 pm Permalink

    OK 2 issues:
    1. Like previous commenter, I noticed something strange with the “title” entry field. The only way I was able to enter text was to click inside box (but not release the mouse) and while holding down mouse - typing with my other hand. Strange.
    2. My “Uncategorized” category has higher number than it should (checked my database). I’m supposed to have i.e. 9… but it the widget is saying 54!

    Otherwise, good stuff.

  8. 4uTak
    November 11, 2006; 1:32 pm Permalink

    how to install on sidebar?

  9. Kaihawaii
    November 16, 2006; 5:34 am Permalink

    Warning: call_user_func_array(): First argumented is expected to be a valid callback, ‘widget_archive_drop_js’ was given in /home/webadmin/……/public_html/wordpress/wp-includes/functions.php on line 1329

    can anyone help me?

  10. Kaihawaii
    November 16, 2006; 7:23 am Permalink

    > It supports dates, categories, and tags (if UTW is installed).

    what is UTW?

  11. November 17, 2006; 6:53 pm Permalink

    Hi,

    How does one remove the bolding and italization on these words in the dropdown list:
    By Date:
    By Category:
    By Archives:

    Any help is appreciated. Thanks.

  12. November 17, 2006; 6:56 pm Permalink

    Hi KAIHAWAII,

    UTW is Ultimate Tag Warrior which allows you to assign “tag words or another word is key words” to your posts (sort of like categories except more expansive). Helps you to find your posts.

    The UTW plugin can be found here:
    http://www.neato.co.nz/ultimate-tag-warrior/

  13. November 17, 2006; 6:57 pm Permalink

    TYPO in my previous comment… I meant, remove bolding and italizatoin on words “By Tags:”… anyway, help?

  14. November 17, 2006; 8:18 pm Permalink

    Fruityoaty: regarding the post count in your “Uncategorized” category, unfortunately I have the same problem. It is “General” on my blog.
    I guess “Uncategorized” is your default category like “General” is my one. So is it possible that the widget also counts blog articles which were discarded? All articles have ID’s. Though I’m just guessing here.

    Another question: does the widget change the way the archive is displayed? The archive just shows two pages of each month or category, sometimes even less although there are more articles.

    Anyway, great widget.

  15. November 19, 2006; 2:53 pm Permalink

    Yes, Uncategorized is my default category. I don’t know very much about coding. I just checked my SQL wp_posts table. It says I have 80 records (these are the things that get assigned primary ID in this table: i.e. pages, actual posts, images in those posts).

    My widget is currently showing “81” in Uncategorized, although I have NO (zero) entries in this default category. Zilch.

    Technically, I have only 29 post archives + 10 pages. It seems to me that the widget might also be counting all those other stuff in wp_posts (i.e. images) and putting it in Uncategorized. Just guessing also.

  16. November 21, 2006; 5:06 am Permalink

    Great job! I’m using this on my website.

  17. November 27, 2006; 6:20 pm Permalink

    Fruityoaty: I have six articles in my ‘General’ category but the widget is displaying 61 articles. Hopefully this will be solved in a later version of the widget.

  18. December 2, 2006; 8:52 pm Permalink

    I am having the exact same issue DLE is having. The plugin shows as activated on the plugins page, but does not appear on the widgets area. I only have a handful of plugins and widgets installed inlcuding the Google search widget, the del.icio.us widget, the category dropdown widget, and the feedburner replacement plugin. Additionally, when the plugin shows as activated this line appears at the top of the blog: Warning: call_user_func_array() [function.call-user-func-array]: First argumented is expected to be a valid callback, ‘widget_archive_drop_js’ was given in /home/*****************/public_html/blog/wp-includes/functions.php on line 1279

  19. December 3, 2006; 7:41 pm Permalink

    Can you just post the sidebar code? I’m using my own custom theme and don’t have widget capability.

    Thanks.

  20. December 6, 2006; 5:33 pm Permalink

    I receive a error message equals Jay, Eyebee and Kaihawaii.
    Some Help ?

  21. December 18, 2006; 10:00 am Permalink

    Great job!.. Im installing this into my webbie. Thanks!

  22. January 7, 2007; 8:46 am Permalink

    I love the dropdown menu! My archives list was way too long. Is there a way to make the dropdown a little narrower to fit inside my skinny sidebar?

  23. Luciano
    March 4, 2007; 8:46 pm Permalink

    Hello,

    The problem some folks had about the widget displaying an warning is due to running an old version of WP.

    Here’s my fix for the 2.0.1:

    Change:
    add_action(’widgets_init’, ‘widget_archive_drop_init’);
    To:
    add_action(’plugins_loaded’, ‘widget_archive_drop_init’);

    Them change:
    wp_get_archives(”type=monthly&show_post_count=$c&format=option”);

    To:
    get_archives(”monthly”,””,”option”,$c);

    Hope it helps you.
    Nice extension but poor support.

  24. March 9, 2007; 12:14 pm Permalink

    Like some of the previous commenters, I had that weird problem editing the widget title—I could only enter text while holding down the mouse button.

    I also wanted to have the date/cat/tag archives displayed in separate menus, so I hacked up part of the code as follows — replace the part from <?php echo $before_widget; ?> to <?php echo $after_widget; ?>

    <?php echo $before_widget; ?>
    <?php if(strlen($title)>0) echo $before_title . $title . $after_title; ?>
    <form id=”f_archive_dropdown” action=”“>
    <ul>
    <?php if($dates) { ?>
    <li>
    <label for=”archmenu”>Date</label>
    <select id=”archmenu” name=”archmenu” class=”navmenu” onchange=”archive_drop_go(this)”>
    <?php if($wpf) { wp_get_archives(“type=monthly&show_post_count=$c&format=option”); } else { drop_wp_get_archives(“show_post_count=$c&format=option”); } ?>
    </select></li>
    <?php }

    if($cats) { ?>
    <li>
    <label for=”catmenu”>Category</label>
    <select id=”catmenu” name=”catmenu” class=”navmenu” onchange=”archive_drop_go(this)”>
    <?php drop_dropdown_cats(0,’All’,’name’,’asc’,0,$c); ?>
    </select></li>
    <?php }

    if(function_exists(‘UTW_ShowWeightedTagSetAlphabetical’) && $tags) { ?>
    <li>
    <label for=”tagmenu”>Tag</label>
    <select id=”tagmenu” name=”tagmenu” class=”navmenu” onchange=”archive_drop_go(this)”>
    <?php $format = array( ‘pre’=>’<optgroup label=”By Tag:”>’,
    ‘default’=>’<option value=”%tagurl%”>%tagdisplay%’.(($c) ? ’ (%tagcount%)’ : ”).’</option>’,
    ‘post’=>’</optgroup>’);
    UTW_ShowWeightedTagSetAlphabetical(‘custom’, $format); ?>
    </select></li>
    <?php
    } ?>
    </ul>
    </form>
    <?php echo $after_widget; ?>

  25. April 9, 2007; 4:55 am Permalink

    FIX: if you are having problems with the widget not appearing, you are probably using an old version of the Sidebar plugin itself. I was using 1.0 (check in Plugins tab).

    You can get the latest Sidebar plugin from here (official site):

    http://svn.wp-plugins.org/widgets/trunk/

    I upgraded to the latest 1.2.1 and it worked fine.

  26. April 9, 2007; 6:44 am Permalink

    If anyone has a copy of Adam Rice’s modification of the plugin, please published it. The code that was published on the message seems to have errors. Thanks.

  27. May 11, 2007; 7:41 am Permalink

    Hello. I installed the widget, but I cannot make it appear in my right side bar. I´m using wp 2.1.3.
    Regards.
    Martin

15 Trackbacks

  1. November 2, 2006; 7:58 am

    […] Reid Beels sent in two widgets: Dropdown Archives can save lots of space in your sidebar, while his Safari Search Field Widget provides a more familiar search box to Safari users visiting your blog. […]

  2. November 3, 2006; 1:27 pm

    […] first: dropdown-archives. they unclutter my sidebar without a single line of coding. it compacts the full archives into a nice dropdown-field. i feel like noone uses the archives, but still felt like letting them stay in the sidebar. […]

  3. November 3, 2006; 2:04 pm

    […] Maybe you have too many things going on that sidebar. Who could resist all of those handy comments, text, and image widgets anyway? One thing that might suffer from the overload of widgets would be your archives. If you’ve been blogging for a long time your archives list might be cluttering up your blog’s sidebar. You can try to solve the problem by taking the list off the side and putting it all a separate page. But if you don’t want to remove the archives, there’s nothing to worry about. Reid Beels has come up with an archive drop down menu widget for those who want easy access to old posts but don’t have the space to put it. […]

  4. December 6, 2006; 6:31 pm

    […] Lembro que a tempos vi um plugin que fazia isto, mas não sabia qual. Pesquisando, encontrei um que promete exatamente isto, inclusive ordenar por categoria e por data. O seu nome é Dropdown Archives Widget. Porém, ao ativar o plugin, toda vez que entrava na homepage do blog recebia a mensagem: […]

  5. December 24, 2006; 11:21 am

    […] Lembro que a tempos vi um plugin que fazia isto, mas não sabia qual. Pesquisando, encontrei um que promete exatamente isto, inclusive ordenar por categoria e por data. O seu nome é Dropdown Archives Widget. Porém, ao ativar o plugin, toda vez que entrava na homepage do blog recebia a mensagem: […]

  6. February 12, 2007; 4:38 am

    […] ダウンロード:Dropdown Archives Widget for WordPress ← Journal ← Reid Beels […]

  7. February 12, 2007; 10:03 am

    […]  本当はプラグイン公式ページもあるのですが、何故かそこからのダウンロード用リンクが見つからなかったもので・・・。 […]

  8. February 12, 2007; 10:20 am

    […] - Dropdown Archives Widget for WordPress ← Journal ← Reid Beels (tags: plugins widgets […]

  9. March 4, 2007; 9:00 pm

    […] instalei o Dropdown Archives Widget do Reid Beels, mas após ativá-lo obtinha o seguinte erro ao acessar o blog: warning: […]

  10. March 6, 2007; 4:18 pm

    […] Dropdown Archives Widget for WordPress ← Journal ← Reid Beels displays your WordPress archive as a dropdown menu. It supports dates, categories, and tags (if UTW is installed). (tags: wordpress plugin widget) […]

  11. March 30, 2007; 12:51 am

    […] well as to share the post via email AdSense Deluxe - This plugin helps you manage your AdSense ads Dropdown Archives - This plugin puts your archive in a dropdown menu. I like this because it’s a space saver. […]

  12. April 9, 2007; 5:54 pm

    […] estamos utilizado para facilitar el acceso a la información en DigiZen es la implementación del Drop-Down Archives  revisado por Adam Rice. A medida que pasa el tiempo,  la lista de las categorías y el […]

  13. April 10, 2007; 5:54 am
  14. May 20, 2007; 12:56 am
  15. July 15, 2007; 11:30 pm

    […] ダウンロード:Dropdown Archives Widget for WordPress ← Journal ← Reid Beels […]

Post a Comment

Use Textile to format comments.