• im trying to use a nested loop, i was using it in a clutttered code that had an error so i made a test to find what was causing the error when i tried this:

    [loop type=”post” count=”5″]
    [field date]
    [field excerpt]
    [-loop type=”cursos count=”3″]test[/-loop]
    [/loop]

    the nested loop works fine, but when i call a field after the nested loop like this:

    [loop type=”post” count=”5″]
    [field date]
    [field excerpt]
    [-loop type=”cursos count=”3″]test[/-loop]
    [field date]
    [field excerpt]
    [/loop]

    the code stops working like if there was no closing tag for the nested loop, is this a bug or is it just me?

    https://wordpress.org/plugins/custom-content-shortcode/

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

    (@miyarakira)

    To be honest, I think not so many users (including myself) are using nested loops – I’m not sure if it’s in the documentation? – so the feature is not well-tested. So, probably you’ve found a bug in the logic.

    I’ll look into this, and let you know what I find out.

    Plugin Author Eliot Akira

    (@miyarakira)

    Hi laikmosh,

    In the newest plugin update, I improved this feature so the posts state is restored for each nested loop. Now the above code should work correctly.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘nested loops not working’ is closed to new replies.