I'm trying to figure out a simple way to exclude a particular category from a wp_query on my homepage. this particular code is already excluding a post_type (videos) from displaying, and I'm not exactly sure how to implement code for excluding a category as well. Here's the current code:
<div data-st="st-six">
<div class="feed-heading"><h4>News & Updates</h4><a class="all" href="news/">Visit the News Page</a>
<hr/></div>
<?php $main_query = new WP_Query( array(
posts_per_page=>3,
'tax_query' => array(
array(
'taxonomy' => 'post_format',
'field' => 'slug',
'terms' => array(
'post-format-video'
),
'operator' => 'NOT IN'
)
),
));
if ( $main_query->have_posts() ): ?>
<?php while ( $main_query->have_posts() ) : $main_query->the_post(); ?>
<div class="card">
<div class="meta"><?php the_time('F j, Y'); ?></div>
<h5 class="gamma"><a href="<?php the_permalink(); ?>" title=""><?php the_title(); ?></a></h5>
<hr/>
</div>
<?php endwhile; ?>
<?php endif; wp_reset_postdata(); ?>
</div>
</div>
The category I want to exclude is "magazine" (slug name) with tag_ID = 44. any suggestions?