How do I display an article using a WordPress custom field?
Yes, and you can use the meta_key along with meta_value parameter. Secondly, you’re going to need two queries when there are no featured posts: Query the featured articles/posts: $q = new WP_Query( [ ‘post_type’ => ‘post’, ‘meta_key’ => ‘featured’, ‘meta_value’ => ‘1’, ‘posts_per_page’ => 3, ‘no_found_rows’ => true, ] ); Query random posts: $q = … Read more