• Hey all,

    I am wondering what the PHP code is to show a list of the most recent posts. I want just blurbs of recent posts stacked. I feel like I was working with something similar but after messing around with it so much I kind of lost and forgot about it. I see this done often, it’s quite nice. Could anyone help me with this?

Viewing 1 replies (of 1 total)
  • hi

    you can start here

    <h3>Recent Articles</h3>
        <ul>
        <?php
            $recentPosts = new WP_Query();
            $recentPosts->query('showposts=5');
        ?>
        <?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?>
            <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a><br /><?php the_excerpt() ?></li>
        <?php endwhile; ?>
        </ul>
Viewing 1 replies (of 1 total)

The topic ‘Listing of Recent Posts’ is closed to new replies.