最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

wp query - how to include orderby value that is empty?

programmeradmin0浏览0评论
global $wp_query;
$args = array_merge( $wp_query->query_vars, array( 'meta_query' => array(
    array('key' => 'release_date',),)
    ,    'orderby' => 'release_date title','order' => 'DESC',  ) );


query_posts( $args );

I'm sorting my post with post that have release_date value, however post that don't have release_date value are not showing, I wish to add them to the list or do I have to edit all my post to add a value in it? I'm currently using the above code.

Any help would be appreciated.

Thanks!

发布评论

评论列表(0)

  1. 暂无评论