Exclude posts from loop
-
My site has four different post categories. On the home page I have it set up so that it shows the most recent post for each, followed by the PageNavi navigation for subsequent pages.
— New Post Cat 1 —
— New Post Cat 2 —
— New Post Cat 3 —
— New Post Cat 4 —But here’s where my problem is. On pages 2 and up I just want to pull up all posts, regardless of their category, and exclude the posts shown on the home page. I can do all of that but the excluding part.
So I guess my question is, how to I exclude the first post from each category in the loop? Is that possible? Offset doesn’t work. Is there maybe some way to pass a variable? I did try $do_not_duplicate_event = $post->ID; but that doesn’t seem to work for paged loops…
Anyone have an idea? Thanks!
- The topic ‘Exclude posts from loop’ is closed to new replies.