Hiding duplicate posts
Hi. I put another loop in the theme to show a single complete post from a certain category, but I don’t want it to appear twice in the bottom posts (I’ve removed that category from the Featured Content). I found this solution
So I put this code in my added loop
$do_not_duplicate = $post->ID;
And now I’m supposed to add this code in the main loop
'post__not_in' => $do_not_duplicate
Problem is, I don’t know where to put it! I found the beginning of the loop in the index.php file, right after I put my “custom” loop.
- The topic ‘Hiding duplicate posts’ is closed to new replies.