Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have an array of post ids i would like to show in a page 16 at a time. The array may include some repeating ids that is why i could not use post__in in a custom wordpress query because some of the posts i want to show again would be skipped.

I also tried using post__in and just cross checking with my array of ids, then inserting the post whenever the array and the current post does not match. This worked but resulted in another problem--pagination. The posts go over my posts_per_page because i am manually inserting posts and the post count is different every time. I could not find a way to break the loop and continue to the next page because it is following only the posts in the wordpress query.

I am thinking of just using a basic php while loop to show my posts but i don't know how to go about pagination then.

Help please!

share|improve this question
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.