add_filter(\'posts_orderby\', \'custom_post_status\', 10,2);
function custom_post_status($args, $wp_query){
if($wp_query->query_vars[\'orderby\'] == \'post_status\') {
if($wp_query->query_vars[\'order\']) {
return \'post_status \'.$wp_query->query_vars[\'order\'];
}
else {
return \'post_status ASC\';
}
}
return $args;
}
添加此选项将在WP\\U查询中启用“orderby”=>“post\\U status”