WPDB SQL Ignore `post_status` Parameter
Well, first of all, you use where post_status=”publish”. So you wouldnt need to explicitly tell the drafts not to show up by using wp_posts.post_status != ‘draft’ I think, your SQL says somthing like: Grab all posts which are published and not drafted and attached to term_id 17 OR grab all posts which are attached to … Read more