07-26-2023, 11:45 PM
I have an array of IDs and I want to get that posts by WP_Quey()
$myarray = $ids;
$args = array( 'post__in' => $myarray);
// The Query
$the_query = new WP_Query( $args );
Its, Sort result by date But I want to sort it by $myarray items and first result would be first ID in $myarray
$myarray = $ids;
$args = array( 'post__in' => $myarray);
// The Query
$the_query = new WP_Query( $args );
Its, Sort result by date But I want to sort it by $myarray items and first result would be first ID in $myarray