OliverWKim
Member
Posted 3 months ago #
I'm building a newspaper theme and I'm trying to emulate the style used by USA Today - one 'main' article with a picture with several articles on the side.
To fill up the 'main' article space I've been using a normal loop, and within that loop I use an if statement to check if the post has an image. However, this presents a problem when I create my second loop to display the secondary articles on the side, as it is impossible to 'skip' over the article displayed just to the left.
Is there a way I could change the first loop so that the second one could skip it over? Or am I doing things totally wrong?
Thanks in advance.
OliverWKim
Member
Posted 3 months ago #
I've already looked at that. But is there a way to have one loop accept only posts with images, then another loop skip the results displayed in the first loop?
@OliverWKim,
yes and yes.
OliverWKim
Member
Posted 3 months ago #
OK, thanks, that's good to know. How would I do something like that?
OliverWKim
Member
Posted 3 months ago #
How would I make the first loop only go through posts with images?
this forum has a search box, did you miss it?
http://wordpress.org/search/check+if+a+post+has+images?forums=1&p=2
see #13 on the second page.
OliverWKim
Member
Posted 3 months ago #
Thank you so much. Turns out I didn't know what to search. :P
youre welcome :) heres a hint, usually you just need to use whatever you would put into your post -- assume other people are doing the same thing as you, in other words :)