<div id="sidebar">
<h3>Archive</h3>
<h4>Latest Articles:</h4>
<?php query_posts('orderby=title&order=asc&showposts=5'); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink() ?>" rel="bookmark" title="Link for <?php the_title(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
<?php endif; ?>
<h4 class="title-dropdown">Articles by date:</h4>
<select name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;">
<option value=""><?php echo esc_attr( __( 'Select Month' ) ); ?></option>
<?php wp_get_archives( 'type=monthly&format=option&show_post_count=1' ); ?>
</select>
<h4 class="title-dropdown">Articles by category:</h4>
<?php wp_dropdown_categories('show_option_none=Select Category'); ?>
<script type="text/javascript"><!--
var dropdown = document.getElementById("cat");
function onCatChange() {
if ( dropdown.options[dropdown.selectedIndex].value > 0 ) {
location.href = "<?php echo get_option('home');
?>/?cat="+dropdown.options[dropdown.selectedIndex].value;
}
}
dropdown.onchange = onCatChange;
--></script>
<?php if ( is_single() ) { ?>
<p>Show this just when a single post is displayed</p>
<?php } ?>
<div class="clear-both"></div>
</div>