There if few ways to achieve what you need:
Option 1:
Add break
after the_content()
in the main content loop.
Option 2:
You can do something like this but I don’t think so that it is a good solution.
<?php if (have_posts()) :
$first_post = true;
?>
<div class="sidebar">
<ul>
<?php while (have_posts()) : the_post(); ?>
<?php
if ( $first_post ) {
$first_post_content = get_the_content();
$first_post = false;
}
?>
<li>
<a href="<?php the_permalink() ?>" title="Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
</li>
<?php endwhile; ?>
</ul>
</div>
<?php rewind_posts() ?>
<div class="maincontent">
<?php echo $first_post_content; ?>
</div>
<?php endif; ?>
Option 3:
Second query. In my opinion the best solution.
<?php if (have_posts()) : ?>
<div class="sidebar">
<ul>
<?php while (have_posts()) : the_post(); ?>
<li>
<a href="<?php the_permalink() ?>" title="Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
</li>
<?php endwhile; ?>
</ul>
</div>
<?php rewind_posts() ?>
<div class="maincontent">
<?php $the_query = new WP_Query( array( 'posts_per_page' => 1 ) ) ?>
<?php while ($the_query->have_posts()) : $the_query->the_post(); ?>
<?php the_content(); ?>
<?php endwhile; wp_reset_postdata() ?>
</div>
<?php endif; ?>