I want to exclude posts from categories 3, 8, and 15 from a search of posts in the last 30 days. The following code works, except that the most recent post in category 3 and the most recent post of category 15 are not excluded. They show up in the results, but all the other posts in those categories are excluded. All posts from other categories are included, as they should be. I don’t know why are these two posts being included. (I have checked, and each of these posts is in just one category — the one to be excluded.)
My code is at http://pastebin.com/AEn3rrEv. How can I fix this? Thanks.
- The topic ‘category__not_in sometimes includes 1st post of excluded cateogry’ is closed to new replies.