Manually call Preview of Latest Post within a Category? (2 posts)

  1. dakotareese
    Posted 8 years ago #


    I'm doing a WordPress site with a static front page. What I could like to do is on that front page is manually call/display a preview of the latest blog post within a certain category.

    I found this plug-in (haven't played with it yet):

    What I could love to do is hardcode this into my homepage template with php. I was hoping that someone knew how to do this or could atleast point me in the right direction.


  2. MichaelH
    Posted 8 years ago #

    Or using the template tag, query_posts(), in your theme's index.php script.

    Display one post with category 7

    query_posts('showposts=1&cat=7'); ?>

    The Loop
    Stepping Into Templates
    Stepping Into Tempalte Tags
    Editing Files

Topic Closed

This topic has been closed to new replies.

About this Topic