Custom query with category exclusion and post-meta “whitelist”
Is it possible to do a custom query and convert it to a standard WP_Query object? Yes. You can do something like… $post_ids = $wpdb->get_col(“SELECT ID FROM {$wpdb->posts} WHERE ….”); $posts_qry = new WP_Query(array(‘post__in’=> $posts_ids,’orderby’ => ‘post__in’)); The second query will preserve the order of results from the first. I am fairly sure that you … Read more