Ready to get started?Download WordPress


How to have 3 loops on my theme (6 posts)

  1. GeorgeOz
    Posted 4 years ago #

    Hi there,

    I am in the middle of creating a new WordPress theme for my new project and I am not sure how to add 3 loops into the index.php.

    Here is how it will be...

    Home Page:
    Loop 1
    - Featured post, 1 Post (from Featured Category only)

    Loop 2
    - Latest Posts, 4 Posts (All remaining posts except Featured and Resources cat)

    Loop 3
    - Latest Resources, 4 Posts (from Resources Category only)

    I hope this makes sense, I don't want any duplicates going into each.

    If someone can help me would be much appreciated.

    Many thanks.


  2. GeorgeOz
    Posted 4 years ago #

    I've looked through that and it seems it is for a 2 loop script. I'm not too clued up on PHP so wouldn't know where to start on a 3 loop? lol


  3. GeorgeOz
    Posted 4 years ago #

    Can anyone help or point me in the right direction of incorporating a 3 loop system on my wordpress install?


  4. you simply add a third loop after the two others.

    example: http://wordpress.pastebin.com/kSWUbKSt

    (totally untested, no formatting)


  5. GeorgeOz
    Posted 4 years ago #

    Wicked, I will try that many thanks.

    This is what I had... http://pastebin.com/NT6eNHfk

Topic Closed

This topic has been closed to new replies.

About this Topic