• I am doing something that seems fairly common, yet can’t find a decent tutorial or documentation to show me how to do this.

    I simply want to display nine posts from a custom post type category. The posts only display the featured image, so the first post is a large image, the 2nd and 3rd are to the right of the large image, and the 4th – 9th are in two rows below the first three.

    I have attached an image here, http://www.mikelythcott.com/support.gif

    I am not a master of php, so if someone could simply write out a bare bones code that shows how to do each loop, and have that loop work with pagination, I would be very grateful and others with the same problem would have a clear solution.

    THE LOOP
    – first post
    – 2nd and 3rd post
    – 4th-6th post

    navigation/pagination
    END LOOP

Viewing 4 replies - 1 through 4 (of 4 total)
  • It is not clear whether you really need 3 loops each with its own navigation, or just a single loop to display 3 different layouts with a single navigation for the one loop.

    If only a single loop is needed, it might be possible to provide a skeleton loop, but it will still be fairly involved.

    do you want the same layout on paginated pages?

    as @vtxyzzy already suggested, pagination will be much easier if you use one loop with conditional sections dependant on the post count.

    set counter variable; loop starts; if statement for (counter==1) -> code for big image; (counter==2 || counter==3) -> code for a side image each; (counter>=4 && counter<=9) -> code for a bottom image each; counter increment; end of loop.

    if you post a link to your site and name your theme (ideally with download link) someone might be able to make further suggestions.

    in case you haven’t read this:
    http://codex.wordpress.org/Theme_Development

    Here is a link to an article showing a working template for the Twenty Ten theme using a single loop.

    http://wordpress.mcdspot.com/2011/06/16/multi-size-multi-row-image-layout/

    Thread Starter indierockmedia

    (@indierockmedia)

    thanks tons, I tried the counter and it worked great, with pagination. I used one loop, with the counter to alter the display of posts (very similar to that link, thanks VTXYZZY!). The tutorial and help is much appreciated, thanks guys!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how to do multiple loops with pagination (need code)’ is closed to new replies.