WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. dakotareese
    Member
    Posted 6 years ago #

    Hi,

    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):
    http://wordpress.org/extend/plugins/category-posts/#post-2550

    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.

    Thanks.

  2. MichaelH
    Member
    Posted 6 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