I'm trying to sort posts based on one post meta value and date. I'm using this plugin ( https://github.com/JonMasterson/WordPress-Post-Like-System ) to add like system to my posts.
The code that I've is as follows.
$args = array( 'numberposts' => 15, 'offset' => 0, 'category' => 0, 'meta_key' => '_post_like_count', 'orderby' => 'meta_value_num post_date', 'order' => 'DESC', 'post_type' => 'post', 'suppress_filters' => true ); $recent_posts = wp_get_recent_posts( $args );
The plugin adds a meta key
_post_like_count to the table if at least one person like the post. The above code just returns posts which have at least one like count ( say 3 out of 15 ).
How do I get the remaining posts which don't have the meta key and sort them based on the date?