Excluding Category
-
Hi All,
I am creating a new page template.
The idea is to show only blog posts in a certain category or exclude a certain category.
<?php if(have_posts()) : while ( have_posts() ) : the_post(); ?> <article <?php post_class('mix'); ?>> <?php if ( has_post_thumbnail() ) { ?> <div class="image"> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> <?php the_post_thumbnail('blog-type-1'); ?> </a>
I have seen a few options on here but am a bit confused which one to use;
<?php query_posts($query_string . '&cat=-4723'); ?>
Thanks
Josh
- The topic ‘Excluding Category’ is closed to new replies.