I want the “latest post” section of my site to have the title, link etc of the latest post UNLESS it’s a snippet (tagged with “snippet”). I have no idea why this code isn’t doing it.
$args = array(
'posts_per_page' => '1',
'tag' => '-snippet' // "-" denotes all except
);
$real_posts = new WP_query($args);
?>
have_posts() ) : $real_posts->the_post(); ?>
LATEST POST •
It just returns that latest post, regardless of tag. So right now my latest post is tagged with snippet, but it still outputs it. So frustrating. Any suggestions? (I tried the same thing with category already)