Title: Pixel64's Replies | WordPress.org

---

# Pixel64

  [  ](https://wordpress.org/support/users/pixel64/)

 *   [Profile](https://wordpress.org/support/users/pixel64/)
 *   [Topics Started](https://wordpress.org/support/users/pixel64/topics/)
 *   [Replies Created](https://wordpress.org/support/users/pixel64/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/pixel64/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/pixel64/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/pixel64/engagements/)
 *   [Favorites](https://wordpress.org/support/users/pixel64/favorites/)

 Search replies:

## Forum Replies Created

Viewing 1 replies (of 1 total)

 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [query_posts offset](https://wordpress.org/support/topic/query_posts-offset/)
 *  [Pixel64](https://wordpress.org/support/users/pixel64/)
 * (@pixel64)
 * [20 years, 4 months ago](https://wordpress.org/support/topic/query_posts-offset/#post-172985)
 * Hi,
 * > I’d like to split my loop into two divs, with 3 posts in each div. I have acheived
   > this by using query_posts for the first loop and get_posts (which has an offset
   > parameter) for the second. However, I would also like to exclude a certain 
   > category from both these loops, but get_posts doesn’t offer that option.
 * maybe my solution solves the problem for other users as well…
    I’ve solved the
   problem shown above for me in that way: my first loop looks like this: ` <?php
   $my_query = new WP_Query('showposts=3'); while ($my_query->have_posts()) : $my_query-
   >the_post(); ?> <!-- Show the first three posts in div1 --> <?php endwhile; ?
   >
 * and the second loop:
    ` <?php $my_query = new WP_Query('showposts=6'); // showposts
   here minus the showposts from the first loop will be displayed while ($my_query-
   >have_posts()) : $my_query->the_post(); $seconddiv = $post->ID; if($seconddiv
   > 6){ ?> <!-- Show the next three posts in div2 --> <?php endwhile; ?>  …maybe
   quick & dirty – but it works. 😉
 * greets,
    Marc 🙂

Viewing 1 replies (of 1 total)