カテゴリページにて、そのカテゴリの記事一覧を表示する方法。
特殊な状況下ではこのような方法も有効かと思います。
ポイントは「get_query_var(‘cat’)」で現在のカテゴリIDを取得できるところでしょうか。あまり知られていないような気がしますが、僕が知らなかっただけかもしれません。
<ul> <?php if (have_posts()) : $cat_id = get_query_var('cat'); $query = 'cat=' . $cat_id. '&showposts=99'; query_posts($query) ; while (have_posts()) : the_post(); ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> <?php endwhile; endif; ?> </ul>