• Hello, I have a problem with nested shortcodes. I need accordion in accordion
    I checked examples and found this one:`
    `[su_spoiler title=”Click me to see nested accordion” style=”fancy”]
    [su_accordion]
    [_su_spoiler title=”Spoiler title”] Spoiler content [_/su_spoiler]
    [_su_spoiler title=”Spoiler title”] Spoiler content [_/su_spoiler]
    [_su_spoiler title=”Spoiler title”] Spoiler content [_/su_spoiler]
    [/su_accordion]
    [/su_spoiler]
    But external item is spoiler. I need it accordion with several items. I tried several options but I can’t do what I need. Can you help me please? Thank you in advance

    https://wordpress.org/plugins/shortcodes-ultimate/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter chiffenok

    (@chiffenok)

    Can any body help, please?

    Hey Chiffenok,

    I believe you are trying to do this:

    Accordion 1
    Spoiler
    Spoiler Content
    Spoiler
    Spoiler Content
    Spoiler
    Spoiler Content
    Accordion 2
    Spoiler Content
    Accordion 3
    Spoiler Content

    If so, the below code will work for you:
    [su_spoiler title=”Accordion 1″ style=”fancy”]
    [su_accordion]
    [_su_spoiler title=”Spoiler”] Spoiler content [_/su_spoiler]
    [_su_spoiler title=”Spoiler”] Spoiler content [_/su_spoiler]
    [_su_spoiler title=”Spoiler”] Spoiler content [_/su_spoiler]
    [/su_accordion]
    [/su_spoiler]

    [su_spoiler title=”Accordion”] Spoiler content [/su_spoiler]
    [su_spoiler title=”Accordion”] Spoiler content [/su_spoiler]

    Take a look at what I did on this website and let me know if that is what you want. http://www.spanishvirtually.com/resources/vocabulary/

    If not, please try and explain your issue or provide a screen shot of what you want.

    Thread Starter chiffenok

    (@chiffenok)

    Thank for your reply. But it’s not completly what I meant.
    It’s hard to explain. Look if you open 2nd item in your example, the 1st one won’t close and there aren’t spoilers inside spoiler
    What I want to do is like this:
    accordion
    -1st item of accordion with a title
    –spoiler(some content inside)/spoiler
    –spoiler(some content inside)/spoiler
    -/1st item of accordion
    -2nd item of accordion with a title
    –spoiler(some content inside)/spoiler
    –spoiler(some content inside)/spoiler
    -2nd item of accordion
    -3rd item of accordion with a title
    –spoiler(some content inside)/spoiler
    –spoiler(some content inside)/spoiler
    -3rd item of accordion
    /accordion

    Is it more clear?

    I have tried doing what you explained (multiple nests w/ content) and was unable to figure it out.

    Seems as if the opening and closing shortcodes do not work like regular code.

    What I currently have is below – which works for me.

    Title
    Spoiler
    Content
    Spoiler
    Content
    Title
    Spoiler
    Content
    Spoiler
    Content

    Sorry I cannot be of further assistance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘problem with nested shortcodes, accordion in accordion’ is closed to new replies.