I want to display 3 specifics posts.
Problem : My posts IDs are from a previous array.
Result : It displays only the first one.
Function :
foreach($fav_author_list as $i => $item) {
$insert = get_user_favorites($item);
if (!is_array($insert[0])) {
$result = array_merge($result, $insert);
}
}
$algoid = implode(",", $result);
Result from $algoid (Post ID) = 865, 866, 877
I want to display the three posts.
$myarray = array($algoid);
$args = array(
'post__in' => $myarray,
);
// The Query
$the_query = new WP_Query( $args );