I am trying to exclude category 4 from my homepage where it displays some of the last blog posts. From reading around there is a line of code I can put in above the beginning of the loop so that category doesn't show up. However, with the theme I'm using my code seems to look different so I don't know where it should go.
<ul class="latestPosts">
<?php
if(get_option('wise_latest_posts')!=''){
$posts_query = new WP_Query($query_string.'&cat='.get_option('wise_blog_id').'&orderby=date&showposts='.get_option('wise_latest_posts'));
}else{
$posts_query = new WP_Query($query_string.'&cat='.get_option('wise_blog_id').'&orderby=date&showposts=4');
}
if ($posts_query -> have_posts()) : while ($posts_query -> have_posts()) : $posts_query -> the_post();
?>
<li>
<?php the_post_thumbnail(); ?><a href="<?php the_permalink(); ?>"><strong><?php the_title(); ?></strong></a><br /> <?php content('25'); ?>
<br /><span>Posted on <?php the_time('F j, Y') ?></span>
</li>
<?php endwhile;
endif;
?>
</ul>
Where does the <?php query_posts('cat=-4'); ?> go?