0
我想我的自定義後類型packages
具有先進的自定義字段排序package_order_id
:排序高級自定義字段
<?php
global $wp_query;
query_posts(array(
'post_type' => 'packages',
'meta_key' => 'package_order_id',
'orderby' => 'meta_value_num',
'order' => 'DESC'
));
while(have_posts()) : the_post();
?>
我尋找其他的答案後導致本我仍然無法工作。
我在做什麼錯?
你看過https://www.advancedcustomfields.com/resources/orde-posts-by-custom-fields/? – Mikk3lRo
是的,這是我第一次看到。 – Jess