I wish to display my wordpress posts inside a category in 2 divs. So for instance:

<ul id="left">

<li class="post">POST 1</li>

<li class="post">POST 3</li>

<li class="post">POST 5</li>

<li class="post">POST 7</li>

</ul>

<ul id="right">

<li class="post">POST 2</li>

<li class="post">POST 4</li>

<li class="post">POST 6</li>

<li class="post">POST 8</li>

</ul>

So want I have to do is tell the query_posts in some way start spitting the first 4 posts oddly after which evenly for every div. I'd rather not have two seperate Wordpress_Queries because this is a category.php file and will need the default loop. Less than sure how to get this done.

Any help much appreciated.

I haven't test this before, this isn't the easiest way but an answer

<?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

        <?php
            $count++;

            if( $count % 2 ) {
                $left_array[] = array( 'content' => get_the_content('more...') );
            }
            else {
                $right_array[] = array( 'content' => get_the_content('more...') );
            }
        ?>

    <?php endwhile; ?>

    <ul id="left">
        <?php
        foreach( $left_array as $post ) {
            echo '<li class="post">'.$post['content'].'</li>';
        }
        ?>
    </ul>
    <ul id="right">
        <?php
        foreach( $right_array as $post ) {
            echo '<li class="post">'.$post['content'].'</li>';
        }
        ?>
    </ul>

<?php else : ?>

<?php endif; ?>

or even the same idea, but one other way:

<?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

        <ul id="left">
        <?php
            $count++;

            if( $count % 2 ) {
            }
            else {
        ?>
                <li class="post"><?php the_content('more...'); ?></li>
        <?php
            }
        ?>
        </ul>

        <ul id="right">
        <?php
            $count++;
            if( $count % 2 ) {
        ?>
                <li class="post"><?php the_content('more...'); ?></li>
        <?php
            }
        ?>
        </ul>

    <?php endwhile; ?>

<?php else : ?>

<?php endif; ?>

What about preconstructing the 2 lists: (I can not can remember the Wordpress query syntax, therefore it is pseudo-PHP:)

<?php
$list1 = array();
$list2 = array();
$i=0;
foreach($query_results as $res) {
  if(($i++)&1) $list2[] = $res;
  else $list1[] = $res;
}
?>

Now list1 consists of the very first, third, ... item and list2 consists of the 2nd, 4th, ... After that you can print them within the two divs as you want.

(On the tangent: Does PHP have succinct method of doing exactly what the above code does? Python has got the walked slicing syntax...)

In case your goal is to possess a two-column listing of posts, it might be much simpler to simply output the posts in a single list, after which use CSS to own appearance of two posts using float, for example:

width: 50%;
float: left;