WordPress.org

Ready to get started?Download WordPress

Forums

Loop question, making it display -1 (4 posts)

  1. Microdot
    Member
    Posted 7 years ago #

    Hi, does anybody know how to make the loop on the front page work in a kind of minus, so for example it will display the second to last post at the start.

    So if the posts in the database are:

    post 1
    post 2
    post 3

    it will only display

    post 2
    post 3

    many thanks for your help

  2. davidchait
    Member
    Posted 7 years ago #

    Rather than explain the physical look, explain the 'theory' behind what you are trying to do. Are you trying to hide a given post? Are you trying to show the first post special, then the rest? Etc.

  3. Microdot
    Member
    Posted 7 years ago #

    Yep, i'm trying to show the first post above the others, using a different format and plug in so it looks a bit special.. the the others towards the bottom of the page.. thanks again

  4. schulte
    Member
    Posted 7 years ago #

    Sounds like you'll want to use two Loops...

    http://codex.wordpress.org/The_Loop
    http://codex.wordpress.org/The_Loop#Multiple_Loops

    the first using a query_posts showposts=1 parameter...and the second having a condition to omit displaying the first post...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags