カテゴリー「xxx」を表示
<ul> <?php query_posts('category_name=xxx'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <li> <?php the_time('Y年m月d日'); ?>:<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </li> <?php endwhile;endif;?> </ul>
カテゴリー「xxx」を最大10件表示
<ul> <?php query_posts('category_name=xxx&posts_per_page=10'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <li> <?php the_time('Y年m月d日'); ?>:<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </li> <?php endwhile;endif;?> </ul>
タグ「zzz」を表示
<ul> <?php query_posts('tag=zzz'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <li> <?php the_time('Y年m月d日'); ?>:<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </li> <?php endwhile;endif;?> </ul>
カテゴリー「xxx」でタグ「zzz」
<ul> <?php query_posts('category_name=xxx&tag=zzz'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <li> <?php the_time('Y年m月d日'); ?>:<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> </li> <?php endwhile;endif;?> </ul>