The MU forums have moved to WordPress.org

Exclude last (few) post(s) (3 posts)

  1. boonika
    Member
    Posted 15 years ago #

    Hi folks!

    I'm using template tags for my home page. Last post is displayed as "featured" in separate window and all the others are displayed bellow that window. The problem is that I get 1st post displayed twice (once inside "featured" window and once as a first post in the list bellow "featured" window).

    How do I exclude last post from the list bellow "featured" window?

    Right now I'm using:

    For the featured post
    query_posts("showposts=1"); ?>

    For the list of posts
    query_posts("showposts=0"); ?>

    Thanks in advance

  2. lunabyte
    Member
    Posted 15 years ago #

    Run a counter and skip the first result.

  3. boonika
    Member
    Posted 15 years ago #

    Thanks lunabyte. I've used this code for displaying list of posts (last one excluded):

    query_posts('showposts=0&offset=1');

About this Topic