Feature Latest Post (2 posts)

  1. Erik
    Posted 8 years ago #

    I dug through the Codex for a bit and could find an answer to this, I would guess there is some kind of tutorial out there if someone could direct me to it that would be great.

    What I'm looking to do it have the last published posted regardless of category sit in a featured type box on the page, then have all the other posts below that featured box with previews that just show the excerpt of the post. I just can't figure out or find out how to have the loop only post the latest post.

    Thanks in advance.

  2. microkid
    Posted 8 years ago #


    You can use the get_posts template tag. You call it twice, once with these parameters:

    $featured_post = get_posts("numberposts=1");

    to get the latest post, and then a second time like this:

    $other_posts = get_posts("numberposts=9&offset=1");

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.