wordpress调用当前文章同分类下的其它文章的方法有挺多,下面这个是相比较最简洁的一种方式

<?php if ( is_single() ) :
global $post;
$categories = get_the_category();
foreach ($categories as $category) :
    ?>
    <li class="jianzhanpress-list" id="<?php $category -> term_id; ?>-posts">
        <h2><?php echo $category -> name; ?></h2>
        <ul>
        <?php
        $posts = get_posts('numberposts=666&category='. $category->term_id); //666为循环条数
        foreach($posts as $post) :
        ?>
            <li>
            <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
            </li>
        <?php endforeach; ?>
        </ul>
    </li>
<?php
endforeach; endif ;
 ?>