Forums

query posts (2 posts)

  1. ads1018
    Member
    Posted 2 years ago #

    Alright, I figured out how to retrieve a particular post using the php query_posts function. This is what I put right before the loop as suggested by the codex:

    <?php
    query_posts('p=4');
    ?>

    It works great. However, what I'd like to do now is retrieve a particular post and my most recent post. Anyone know how to accomplish this using the query_posts function?

  2. MichaelH
    Volunteer
    Posted 2 years ago #

    Probably need two loops to do that. This article uses get_posts (same parameters as query_posts) to do that:
    http://www.daobydesign.com/blog/2007/07/modifying-wordpress-front-page/

Topic Closed

This topic has been closed to new replies.

About this Topic