0
我想從我已輸入到帖子中的元數據創建自定義循環。自定義帖子類型循環不工作
<?php $args = array (
'post_type' => array('movies'),
'order' => 'DESC',
'order_by' => 'get_post_meta(get_the_ID(), "released", true)',
);
$query = new WP_Query($args);
if ($query->have_posts()) :
bd_pagination();
while ($query->have_posts()) : $query->the_post(); ?>
我那麼那麼需要幫助PLZ
發佈其內的電影后期 – scottiescotsman
但是什麼格式的數據的元數據字段?這將決定您是否使用「DATE」或「NUMERIC」或其他用於排序的內容。例如,如果元數據是10152007和01041998作爲日期,則您需要使用meta_value_num和NUMERIC對其進行排序。合理? –
陣列( 'ID'=> '發佈', '名稱'=> __( '發佈日期', 'textdomain'), '類型'=> '日期', ), – scottiescotsman