WordPress.org

Ready to get started?Download WordPress

Forums

how to create Multiple Loop in archive Page (5 posts)

  1. atali
    Member
    Posted 2 years ago #

    hi i want to create multiple column on archive page but dont want duplicate posts

    i have seen "loop in action" (wp codex) but i want to create more then 4 loops

    please help me you can see what i have done so far if you can modify or guide me http://pastebin.com/Cbg95nDY

  2. TCBarrett
    Member
    Posted 2 years ago #

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

    Use the $do_not_duplicate[] array with the post__not_in argument. You can build that as many times as you want.

  3. atali
    Member
    Posted 2 years ago #

    dear can you please explain ?

    i tried but failed actually i want like this

    http://demos.gabfirethemes.com/wp-newspaper/category/finance/

    you can see on this category page showing 3 loops

  4. alchymyth
    Forum Moderator
    Posted 2 years ago #

    a layout as in your example does not need three loops; it could be done by using a counter or the $wp_query->current_post information to style the (8) posts according to their position in the loop.

    please name the theme that you are using, and post a link to your site - as a base for more detailed suggestions.

  5. atali
    Member
    Posted 2 years ago #

    dear i tried wp_query, but it display latest post in archive page / category page

    could you please have a look what;s the bug ?
    http://pastebin.com/EXjdag7W

Topic Closed

This topic has been closed to new replies.

About this Topic