$args = array(
\'meta_key\' => \'home_post_id\',
\'orderby\' => \'meta_value_num\',
\'order\' => \'DESC\',
\'meta_query\' => array(
array(
\'key\' => \'home_post_id\',
\'value\' => 0,
\'compare\' => \'>\',
\'type\' => \'numeric\',
)
)
);
query_posts($args);
像这样的东西应该可以工作,但我还没有测试过。)<如果有效,请告诉我。。
参考号:WP_Query - Custom Field Parameters