WordPress.org

Support

Support » How-To and Troubleshooting » Exclude a category in my multiloop code?

Exclude a category in my multiloop code?

  • I’m using the following code as the first part of my multiple loop layout. The first loop contains one post and the second displays the rest (sans the original post on top).

    $vposts = new WP_Query(‘showposts=1’); while ($vposts->have_posts()) : $vposts->the_post(); $do_not_duplicate = $post->ID;

    The problem is, I have an Asides category that I *want* in the second loop but not to be included in the first. I’ve added “&cat=-14” to the above query with no effect.

    Anyone have suggestions on how to accomplish this? Any help would be appreciated.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Exclude a category in my multiloop code?’ is closed to new replies.
Skip to toolbar