I have the following code at the beginning of a loop:
<?php query_posts('showposts=3&cat=84'); ?>
<?php $posts = get_posts('category=84&numberposts=3&offset=0'); foreach ($posts as $post) : start_wp(); ?>
I have a custom taxonomy called “display,” with a tag called “featured-slider.” In this loop, I want to include everything from category 84, but I want to exclude everything with a “featured-slider” value in the “display” taxonomy.
How would I rewrite the two lines above (query_posts and get_posts) to correctly exclude the custom taxonomy?
thank you
I have rewritten the
query_posts
. As forget_posts
you are better off using the WP_Query due to more control over the tax_query. Explained here.Edit: I added the usage.