WordPress.org

Ready to get started?Download WordPress

Forums

using post__in to accept repeating ids from array (1 post)

  1. Army Leaf
    Member
    Posted 1 year ago #

    Hi, I am generating an array from a custom sql query. This array contains certain posts that I want to be called in the loop. I am using post__in in the $args to be able to get them. It works fine but the only problem is it's not accepting repeating IDs.

    Let's say the array is as follows:
    $array(1,2,3,4,5,2,6,7,8,5);

    Instead of showing all the posts in the array, it skips the repeating ids. Is there any way to work around it? Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic