displaying separate posts based on sequential order
-
Hello All,
I am trying to figure out how to display the three most recent posts in three separate areas of my main page. I have three boxes that will have the three most recent posts in them. Box 1 has the most recent, box 2 the second most recent, and box 3 the third most recent. When a new post is made, what is in the boxes will change. I only want to display one post per box.
I have tried
<?php $posts=get_posts('numberposts=3&offset=0'); foreach ($posts as $post) : ?> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <p><?php echo limit_words(get_the_excerpt(), '40'); ?></p> <a href="<?php the_permalink(); ?>">Read More >></a> <?php endforeach ?>
This works until I reload the page and it keeps adding posts into the boxes. Any help would be great. Thank you very much.
Harberg
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘displaying separate posts based on sequential order’ is closed to new replies.