Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- first loop : 1 post --
- <?php
- if ( ++$count == 1 and have_posts() ):
- $count = 0;
- while ( have_posts() ):
- the_post(); ?>
- <a href="<?php the_permalink(); ?>" title=""><?php the_title(); ?></a> <br />
- <br />
- -- second loop : 2 posts --
- <?php
- if ( ++$count == 1 and have_posts() ):
- $count = 0;
- while ( have_posts() ):
- the_post(); ?>
- <a href="<?php the_permalink(); ?>" title=""><?php the_title(); ?></a> <br />
- <br />
- -- third loop : 3 posts --
- <?php
- if ( ++$count == 3 and have_posts() ):
- $count = 0;
- while ( have_posts() ):
- the_post(); ?>
- <a href="<?php the_permalink(); ?>" title=""><?php the_title(); ?></a> <br />
- <br />
- -- fourth loop : the rest --
- <?php
- if ( ++$count == 5 and have_posts() ):
- while ( have_posts() ):
- the_post(); ?>
- <a href="<?php the_permalink(); ?>" title=""><?php the_title(); ?></a><br />
- <?php
- endwhile;
- else: // fourth loop has no posts
- endif;
- endwhile;
- else: // third loop has no posts
- endif;
- endwhile;
- else: // second loop has no posts
- endif;
- endwhile;
- else: // first loop has no posts
- endif;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement