This code, just before the loop:
<?php $arc_year = get_the_time('Y'); ?>
<a href="<?php echo get_year_link($arc_year); ?>"><?php the_time('Y'); ?> archive</a>
worked just fine for me using the WordPress Default theme. Wonder if a plugin is causing the problem.
@michaelh: Grateful for your help. Plugins are not an issue. I checked all of them turned off. Could the behavior have something to do with this following line I have before the loop in archive.php:
<?php query_posts($query_string.'&posts_per_page=50'); ?>
I use the above to override the number of posts displayed in an archive page. (e.g.,: http://ckunte.com/archives/2009/01 ).
Funny thing is, this query_posts call is working just fine for listing monthly archive (example above), and for listing day archive (e.g.,: http://ckunte.com/archives/2009/01/16 ). If the query_string works for the month, and the day, I wonder this url http://ckunte.com/archives/2009 keeps listing only the main archives page http://ckunte.com/archives ?
Any ideas?
Again, as I said earlier, not a single line of code has been changed since 2.7.1 in which it worked flawlessly, and not a single plugin (with the exception of the latest Akismet) has been added or upgraded.
This seems to be working right:
http://ckunte.com/archives/2009
@michaelh: Yes, it’s now working, because I had to change my Permalink structure. WordPress 2.8 forces me *not* to use /archives/%postname% as a permalink structure for the yearly archive to work.