July 23, 2014
I’ve run into problems several times where exclude and include do not work, or work selectively, and as a result, either all of the posts are included, or none of them are. I’ve found an answer that works both inside and outside of the loop.
$args = array ( 'post_type' => 'post', 'posts_per_page' => 1, 'category' => -3 ); $single_post = get_posts($args);