Exclude special "Taxonomy" from a Custom Post Type…
-
Here I “query” the posts from the Custom Post Type “work”.
<?php query_posts($query_string . 'post_type=work&posts_per_page=4&meta_key=design'); ?> <?php $counter = 1; $num_posts = $wp_query->post_count; ?> <?php while (have_posts()) : the_post(); ?> <?php $extra_class = 'fourstarters'; if( $counter == $num_posts ) { $extra_class = 'fourstarterslast'; } ; $counter++; ?> <div <?php post_class($extra_class); ?> id="post-<?php the_ID(); ?>"> <?php $image = get_post_meta($post->ID, "Image1", true); echo $image; ?> <h3>" title="<?php the_title() ?>"><?php the_title() ?></h3> <?php the_excerpt(__('')); ?> </div> <?php endwhile;?>
As you can see I gie the first three posts a different Class than the last one. Yeah now I want to EXCLUDE all the Posts which are in the Taxonomy named “frontcover” or with the ID=6 (it’s the same). How can I do this ??
Thank you already very much! Greatings
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘Exclude special "Taxonomy" from a Custom Post Type…’ is closed to new replies.