Support » Fixing WordPress » using post__in to accept repeating ids from array

  • 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!

  • The topic ‘using post__in to accept repeating ids from array’ is closed to new replies.