WordPress – Consecutive Nested Shortcode Execution Fails Without Line Breaks

If I have multiple items nested at the same level, such as a list and a enter it as such into the content of the page:

[list]
    [list_item]My Item[/list_item]
    [list_item]My Item[/list_item]
    [list_item]My Item[/list_item]
[/list]

It renders fine. If I do the same and format it like this:

Read More
[list][list_item]My Item[/list_item][list_item]My Item[/list_item][list_item]My Item[/list_item][/list]

Every second list_item doesn’t render properly. Does anyone know why this is and how to fix it?

Related posts

Leave a Reply