サイドバーに現在カテゴリの記事のタイトル一覧を表示したいのですが、
サブカテゴリ以下の記事タイトルは非表示にしたいです。
現在、記事のタイトル一覧表示は、
<?php
$catname= single_cat_title("",false);
$cat=get_cat_ID($catname);
if (is_home() == False) {
if (have_posts()) : query_posts("posts_per_page=-1&cat=$cat"); ?>
<ul>
<?php while (have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
<?php the_title(); ?></a></li>
<?php endwhile; endif; ?>
<?php wp_reset_query(); ?>
</ul>
<?php } ?>
上記のようにしていますが、
サブカテゴリの記事タイトルも一緒に表示されてしまいます。
どの部分をいじればうまくいきますか?
よろしくお願いします。