show at most n posts EXCLUDING certain categories?
-
When I say “Show at most: 5 posts” in the Reading option in the dashboard, it only displays 3 posts in the frontpage. I suspect that it’s because of this code (my index.php loop):
<?php while (have_posts()) : the_post(); ?>
<?php if ( in_category('5') || in_category('6') ) { ?>
...do nothing, haha...
<?php } else { ?>
...poststuff in the loop...
<?php } ?>
Right now, in my testblog, I have 2 categories that fall under categories 5 and/or 6, so that seems to be the “missing” 2 (2+3=5, yay). Is there any way I can hide certain categories from the frontpage so that WordPress can also skip their count?
I think this is a minor issue for me since I simply want to see how things look with different number of posts (as few as possible, perhaps), but if I do choose 1 post, it won’t show anything due to the same reason. It’s kind of weird, don’t you think?
- The topic ‘show at most n posts EXCLUDING certain categories?’ is closed to new replies.