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!
compare
set toNOT EXISTS
- see my answers here and/or here. And please, avoid usingquery_posts()
- use thepre_get_posts
hook if you wish to modify the main WordPress query.