How to exclude a category…
-
OK, I know how to use get_posts to get posts from a single category. Got that OK…. Now what I want to do is EXCLUDE a category from the listing.
Here’s what I’m up to, on my page, I want the first post to be the latest post from a particular category – that’s the part I get, no problem. This will be me welcome/site news/upcoming stuff.
The next thing I want is the last post, UNLESS it’s in the category that is display above. So I want to exclude that category. Otherwise I get the same post listed twice.
I suppose I could put all my postings, except for the news ones, into a “General” category, then draw from that…. just seems like a kludge….. but probably would work….
If any one else has any ideas, I’m open to suggestions.
-tg
- The topic ‘How to exclude a category…’ is closed to new replies.