Answer the question
In order to leave comments, you need to log in
Posts differently in wordpress, how to modify the loop?
An example is on the main page www.lookatme.ru
and here is also similar severn-wp.ecko.me
or change the cycle or do several,
it doesn’t work like that
<?php
$postnum = 0;
while (have_posts()) : the_post(); ?>
<?php if ($postnum <= 2){ ?>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<div class="date"><span><?php the_time('M j') ?></span></div>
<h2>(<?php echo $postnum;?>)<a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
<div class="post-image" style="text-align:center;">
<a href="<?php the_permalink() ?>"><img src="<?php bloginfo('template_directory' ); ?>/timthumb.php?src=<?php echo catch_that_image(); ?>&w=500&h=200&zc=1" alt="<?php the_title(); ?>" /></a>
</div>
<p><?php the_content('Read the rest of this entry »'); ?></p>
<p class="more"><a href="#">Read More</a></p>
</div>
</div>
<?php } else {
<div <?php post_class( 'single ' . $end ); ?> id="post-<?php the_ID(); ?>">
<div class="post-content">
<h3><a href="<?php the_permalink() ?>">(<?php echo $postnum; ?>)<?php the_title(); ?></a> <?php edit_post_link('_', '', ''); ?></h3>
<p><?php the_excerpt( '' ); ?></p>
<p class="more"><a href="#">Read More ?</a></p>
</div>
</div><!-- End post -->
<?php }
$postnum++;
endwhile;
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question