1. ページのコンテンツを表示する 2. ページ コンテンツの下に、特定のカテゴリのすべての投稿 (または投稿のサムネイル) を表示する
私のコードがずさんな場合はご容赦ください。これを行うためのより良い方法があれば、私は学びたいと思っています。サイトが完成すると、おそらく 30 以上のカテゴリが存在することになります。
<?php get_header(); ?>
<div id="outerWrapper">
  <div id="pageContent">
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <h2>
      <?php the_title(); ?>
    </h2>
    <?php the_content(); ?>
    <?php endwhile; endif; ?>
    <?php query_posts('category_name=cold-casting'); ?>
    <?php while (have_posts()) : the_post(); ?>
    <div class="pages"> <a href="<?php the_permalink(); ?>">
      <?php the_post_thumbnail(); ?>
      </a> </div>
    <?php endwhile;?>
    <div class="clear"></div>
  </div>
</div>
<?php query_posts('category_name=casting'); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="pages"> <a href="<?php the_permalink(); ?>">
  <?php the_post_thumbnail(); ?>
  </a> </div>
<?php endwhile;?>
<div class="clear"></div>
</div>
</div>
<?php get_footer(); ?>