Exclude Custom Category from Custom Post Type Loop
-
Hello,
I have setup a custom post type that has multiple categories. However, I would like to setup the archive-custom.php file to hide a specific category.
I was sucessfully able to use the following code on the index.php page for the regular WordPress post type to exclude a category, but it does not seem to work for the custom post type/category.
<?php query_posts('cat=-4'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> ...Rest of Loop... <?php endwhile; ?>
Is something different needed when using a custom post type/category?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Exclude Custom Category from Custom Post Type Loop’ is closed to new replies.