Wordpress - 从显示所有类别到显示特定

Currently, I have a page that shows posts from all categories (3 categories). Now, I'm trying to make a similar page but I don't want to show one of those categories.

I know that I need it to go from Show all to show categories with id 10,11,15.

Here's my current working php script that shows all.

<div class="clearFloat">
<div id="container">
    <div id="content" role="main">
        <?php
        // get all the categories from the database
        $cats = get_categories();

        // loop through the categries
        foreach ($cats as $cat) :
            // setup the cateogory ID
            $cat_id= $cat->term_id;
            // Make a header for the cateogry
            ?>
            <div class='category-container clearFloat'>
                <h2><?php echo $cat->name; ?></h2>
                <?php
            // create a custom wordpress query
            query_posts("cat=$cat_id&posts_per_page=100");
            // start the wordpress loop!
            if (have_posts()) : while (have_posts()) : the_post(); ?>
                <?php // create our link now that the post is setup ?>
                <div class="course">
                    <a href="<?php echo get_the_permalink(); ?>">
                        <h3 class="course-title"><?php the_title(); ?></h3>
                    </a>
                    <div class="promo"></div>
                    <div class="course-content">
                        <?php the_excerpt(); ?>
                    </div>
                    <div class="fadeUp"></div>
                    <a class="more-link" href="<?php echo get_the_permalink(); ?>">Find out more</a>
                </div>
            <?php endwhile; endif; // done our wordpress loop. Will start again for each category ?>
            </div>
        <?php endforeach; wp_reset_query();// done the foreach statement ?>

    </div><!-- #content -->
</div><!-- #container -->

use include argument in your get categories function

$args = array('include'=>'10,11,15');
$cats = get_categories($args);

Please replace your code:

$cats = get_categories();

with

$cats = get_categories('exclude=10'); //you can replace 10 with id of category you want to exclude

It will solve your problem.