나는 meta_value 및 ID를 사용하여 마지막 x posts posts를 가져 오도록 wp_query를 만들려고합니다. prop_featured 값은 1 또는 0 일 수 있습니다. prop_featured = 1을 첫 번째 것으로, 나머지는 prop_featured = 1 인 게시물 목록을 얻고 싶습니다.WP_Query orderby meta_key 및 id
$args = array(
'post_type' => $type,
'post_status' => 'publish',
'paged' => 0,
'posts_per_page' => 10,
'meta_key' => 'prop_featured',
'orderby' => 'meta_value ID',
'order' => 'DESC'
);
나는 또한이 솔루션은 필터와 함께 작동하도록했다 'orderby' => 'meta_value_num ID',
을 내가 한 - 같은 결과를 – Crerem