Support » Themes and Templates » 2 loops needed for very different styling?

  • Hey,

    I’m building a front page that looks like this image: http://postimage.org/image/566fcqkk/

    As you can see, there are distinct styling differences between the first and subsequent posts.

    What is the best way to do this? Two loops, or just use one loop with a lot of conditional coding for the first div?

    Bless,
    [sig moderated as per the Forum Rules]

Viewing 3 replies - 1 through 3 (of 3 total)
  • One loop with conditional coding for the first post.

    Thread Starter Chris Lowry

    (@bigonroad)

    thanks, yeh I realised I was being an idiot!

    Nope – it was a reasonable question to ask. Sometimes there’s very little to lose/gain between the 2 approaches. But, in theory, if this is just a matter of styling, all you need to do is add an extra class to the first post and do the rest via CSS – which means one less db query compared to the 2 loops approach.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘2 loops needed for very different styling?’ is closed to new replies.