• After recent update I noticed my nested accordions were displaying incorrectly

    The nested titles were reduced to the first word of the title preceded with a ” mark and the icons were displaying the open “—” symbol while actually closed. E.g. — “Title

    I had been using:

    [su_accordion][su_spoiler icon="plus" title="xxxxx" style="simple"]
    
    [_su_spoiler icon="plus" title="xxxxxx" style="simple"]
    [_/su_spoiler]
    [_su_spoiler icon="plus" title="xxxxxx" style="simple"]
    [_/su_spoiler]
    
    [/su_spoiler][/su_accordion]

    the solution (which I don’t really understand – but works) was to change, for the nested items, _su_spoiler to su_spoiler (removing the first underscore):

    [su_accordion][su_spoiler icon="plus" title="xxxxx" style="simple"]
    
    [su_spoiler icon="plus" title="xxxxxx" style="simple"]
    [_/su_spoiler]
    [su_spoiler icon="plus" title="xxxxxx" style="simple"]
    [_/su_spoiler]
    
    [/su_spoiler][/su_accordion]

    N.B. I had to leave the closing tag for the nested accordions as [_/su_spoiler]. That is the part I don’t understand – but it works

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter NightL

    (@nightl)

    Think the issue comes about from my wanting to use style=”simple” and have the icon=”plus” on the container su_spoiler as well.

    Examples of Nested shortcodes – in the left menu in admin
    Shortcodes/Examples – scroll to Advanced examples / Nested shortcodes, shortcodes inside of attributes

    tazziedave

    (@tazziedave)

    Thanks for this. It goes against the documentation (and good sense) but it works.

    It also helps with using anything other than the default icon which was forced into the ‘open’ state in sub spoilers. With your fix the icons behave themselves as well.

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

The topic ‘Nested Accordions’ is closed to new replies.