Вывод постов в WordPress без сортировки массива

Этот код

$args = array(
    'include' => $postIdArr
);
print_r($args);

Выводит

Array ( [include] => 241,284,234,248 )

Этот код

$featured_posts = get_posts($args);
foreach( $featured_posts as $post ):
 setup_postdata($post);
 $postId = $post->ID;
 array_push($actualPostsIdArr, $postId);
endforeach;
print_r($actualPostsIdArr);

Выводит

Array ( [0] => 284 [1] => 248 [2] => 241 [3] => 234 )

Как видно выше происходит сортировка id постов. Как уйти от этой сортировки? Нужно сохранить порядок.


Ответы (0 шт):