例えば、一つのカテゴリにつき一つの最新記事を表示する、ということもできます。
< ?php $categories = get_categories('parent=1&order=DESC'); foreach($categories as $category) : query_posts('showposts=1&cat='.$category->cat_ID); if (have_posts()) : while (have_posts()) : the_post(); ? > <article> <div> <a href="<?php the_permalink() ?>"> <?php the_title(); ?> <?php if (has_post_thumbnail()) : ?> <?php the_post_thumbnail('thumbnail'); ?> <?php else : ?> <p>no image</p> <?php endif ; ?> </a> </div> </article> <?php endwhile; endif; endforeach; ?>
parentにはカテゴリIDを、showpostsにはカテゴリごとの記事数を入れます。