Currently I’ve got the following..
<ul id="index-wall"> <?php $posts = get_posts('numberposts=15&order=ASC'); foreach( $posts as $post ) : ?> <li class="boxgrid slidedown"> <img class="cover wp-post-image" alt="<?php the_title(); ?>" src="<?php echo p75GetThumbnail($post->ID, null, null); ?>" style="float:left;margin:0 10px 0 0;" border="0" /> <p><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><span class="title"><?php the_title(); ?></span><?php the_category(', '); ?></a></p> </li> <?php endforeach; ?> </ul>
What I want is using for each is to display 15 posts.. like it does currently but I want to add that when the total number of posts exceeds 15 posts that it creates a new unordered list and then populate it with the next 15 posts until the total number of posts peters out..
Anyone got any advice?
- The topic ‘Display posts using 'foreach' but presented in brackets/units/page’ is closed to new replies.