Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Eliot Akira

    (@miyarakira)

    Hello,

    I added a few parameters to the [if] shortcode to achieve what you described. Please see the latest update.

    To display something on every 3 results:

    [loop type="post"]
        [content field="title"]
        [if every="3"]
            <hr>
        [/if]
    [/loop]

    In addition, there’s [if first] and [if last] to display something on the first or last post.

    Hopefully these can be combined to do what you wanted. As I was testing these, I realized it’s not so simple to add opening and closing tags around 3 posts at a time, if the total number of posts is not divisible by 3.

    So, please let me know if it works for you.

    As for the pagination add-on, it’s taken me longer than planned, but I’m working on it. πŸ™‚

    Thread Starter nyoz

    (@nyoz)

    Works like a charm ! I’m adding a <div class=”clearfix”></div> every 3 items, and the global container is declared outside the loop, so there’s no issue if the total isn’t %3.

    Thanks again for your reactivity, amazing ! πŸ™‚

    Plugin Author Eliot Akira

    (@miyarakira)

    Perfect, I’m glad it worked for your purpose.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Getting the loop incrementation index (-> if %3)’ is closed to new replies.