I've created an array based on the numerical values of an object. After which I removed everything in the object in the array, except for the ID. So it ends up looking like this:
[115, 123, 66, 64]
That is my array of posts in the order I want it in.
I then want to display those posts in that order using the Ajax Load More Plugin. So I set it up as such:
obj['post__in'] = distanceIdFilter, obj['orderby'] = 'post__in'
Note that the 'distanceIdFilter' is just the variable for the array I would like to use. When I console log it the post__in is grabbing the correct array and the correct order I would like it to be in. orderby also says that it is ordering by "post__in" which is also what I want because it should show the items in the array in that order.
The problem comes from when I filter that with Ajax Load More, it doesn't put the posts in the correct order and I assume it is putting them in order by date, because of the default orderby parameter.
I can't seem to figure out why it is not being ordered correctly?