Oh, hello! I want to show the three most recent blog posts in the home page, excluding the "featured" category, which has the ID 8. In order to see the ID for that category, I went to Posts > Category and hovered the cursor on it:
<div class="row">
<div class="col-xs-12 col-sm-8">
<?php
$args = array('posts_per_page' => 3, 'orderby' => DESC, 'cat=-8');
$temp = $wp_query;
$wp_query = null;
$wp_query = new WP_Query($args);
while(have_posts()):the_post(); ?>
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<?php the_excerpt(); ?>
<?php endwhile;
$wp_query = null;
$wp_query = $temp;
wp_reset_postdata();
?>
</div>
<div class="col-xs-12 col-sm-4">
<?php get_sidebar(); ?>
</div>
</div>
I've experimented with several options and I can't find a solution. I hope you guys can help me. Cheers!