Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnbhartley/4452977 to your computer and use it in GitHub Desktop.
Save johnbhartley/4452977 to your computer and use it in GitHub Desktop.
http://wordpress.org/support/topic/how-to-add-four-wp-queries-without-duplicate-posts
query for loop1
loop1:
$do_not_duplicate[] = $post->ID;
end loop1;
query for loop2 including 'post__not_in => $do_not_duplicate'
loop2:
$do_not_duplicate[] = $post->ID;
end loop2;
query for loop3 including 'post__not_in => $do_not_duplicate'
loop3:
$do_not_duplicate[] = $post->ID;
end loop3;
query for loop4 including 'post__not_in => $do_not_duplicate'
loop4:
end loop4;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment