Hiding duplicate posts (1 post)

  1. matatias
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic