List a brief archive with excerpt (3 posts)

  1. Jared Cunha
    Posted 8 years ago #

    I'm sure this may have been asked before, but I could not find an answer for the life of me. What I am trying to do is have a brief list of archives (the latest 2 or 3 posts) with excerpts listed on my homepage, while excluding anything listed in category 4.

    To see what I'm talking, look at lower right hand side of my page.


    Any advice or a point in the right direction will be an enormous help.

  2. Kwebble
    Posted 8 years ago #

    Perhaps get_posts() can select the posts that you want to show.

    Or you could create a second loop with query_posts().

  3. Jared Cunha
    Posted 8 years ago #

    Thanks, I found a partial solution with this:

    $lastposts = get_posts('numberposts=3');
    foreach($lastposts as $post) :
        <h4><a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>"><?php the_title(); ?></a></h4>
        <?php the_excerpt(); ?>
    <?php endforeach; ?>

    I still need to go back and style the links now.

    I think I can figure the rest from here.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.