• Right now all my posts in my index page are excerpts
    I want to query the latest post and make it function with the <!–more–> tag.
    How do I query the first post and put the condition ?

    I want it to be like
    <?php while (have_posts()) : the_post(); {
    if query_post(latest post)
    the_content();
    else
    the_excerpt();
    } ?>

    I think the query part is wrong though. I have no idea which to use. Any help here ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • if i understand what you are asking for, you need two loops.

    display the full content of the 1st post

    <?php query_posts('showposts=1');
    while (have_posts()): the_post(); ?>
       <?php the_content(); ?>
    <?php endwhile; ?>

    display excerpts from all the other posts – skip the first post (offset = 1)

    <?php query_posts('offset=1');
    while (have_posts()): the_post(); ?>
       <?php the_excerpt(); ?>
    <?php endwhile; ?>
    Thread Starter seedpxwee5

    (@seedpxwee5)

    What does showpost=1 means ?
    Does that means the latest post?

    So if I put showpost=2 or showpost=3 or showpost=4
    Does that means 2nd latest, 3rd latest and 4th latest ?

    showposts means the number of posts to show

    it starts at the latest one by default

    offset=1 means to skip the first one

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Different latest post with other posts (Query Question)’ is closed to new replies.