trouble excluding category
I have been at this for hours and hours, trying different things. Basically, there should be 3 posts on the home page: the most recent one in category A, recent in category B, and a featured one that is either catA OR catB along with the category “featured”.
SO, I got it working by first calling a post in BOTH category A and featured. but the post is also showing up as the listing in category A. So I tried adding on to the second loop as here:
<?php $posts = get_posts('category=A&numberposts=1&offset=0'); foreach ($posts as $post) : start_wp(); ?> <?php if (in_category('featured')) continue; ?>
but that skips the category entirely.
I’m at a loss. I was trying some variations of showing posts in columns where it wouldn’t repeat posts, but couldn’t get two different categories to work with that. Pointers greatly appreciated!
- The topic ‘trouble excluding category’ is closed to new replies.