• I know a lot of people are aware of this problem, and I think it’s something that really needs looked at for an upcoming release.

    Currently if I have 100 posts, split them over 10 pages and order them randomly, the same post can appear several times through the pages. Now this might not seem like a huge issue but the big part of this problem is that not all posts are displayed. This is because of the repeated posts.

Viewing 1 replies (of 1 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    I use this:

    <?php $do_not_duplicate[] = get_the_ID(); ?>

    to prevent duplication between my slide show and post sections.

    Kinda works like this:
    $loop = new WP_Query( array( 'cat' => $category, 'posts_per_page' => 11, 'post__not_in' => $do_not_duplicate ) );

Viewing 1 replies (of 1 total)
  • The topic ‘Post repetition when using 'orderby=rand'’ is closed to new replies.