WordPress.org

Support

Support » How-To and Troubleshooting » Query posts options

Query posts options

  • Hello, I’m trying to find a simple way to query posts where the first three are placed in one div and the rest are placed in another. Any ideas?
    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Michael

    @alchymyth

    how simple depends on your existing theme;

    you could try and work with a counter variable and some conditional statements within the loop, to check for the first and third post, and to add the div(s) accordingly.

    please post a link to your site for more detailed suggestions.

    The site is still not online, so unfortunately I can’t post a link yet. I’m building the theme from scratch.

    Can you explain how a counter variable would work? I’ve never done that before.

    What I’m trying to do is use query posts to find the first three (most recent) posts on the first pass, and then all other posts on the second pass…

    Let me know if that makes sense.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Query posts options’ is closed to new replies.