Using Theme: Twentyten (child)
Installation: local, multisite network enabled
To exclude posts from category id 9 in the main blog section of the home page (because those posts are already called into a separate text area of the same page, so in the blog section I don’t want them duplicated).
I’ve tried the following:
<?php /* For home page only */ ?>
<?php if (is_home() : ?>
<?php query_posts(’cat=-9′); ?>
placed this inside loop-index.php immediately after <?php /* How to display all other posts. */ ?> (inside the loop). As a result, all blog posts disappear from my home page (except those in the separate text area).
- The topic ‘exclude posts of specific category’ is closed to new replies.