• Hello,

    How to modify an accordion block when the content part is empty. I have a situation, where for some of the items the accordion heading is enough, and only some require additional content.

    If empty then the right arrow should not be displayed and clicking on the heading should not open the empty content part.

Viewing 1 replies (of 1 total)
  • Plugin Support gdandrija

    (@gdandrija)

    Hi @jaak69, I hope you are doing great.

    Accordion block is designed to be uncollapsed and then collapsed back to their original state. Preventing them from doing this would beat the purpose of using an Accordion block and in that case, a Paragraph block should do the trick.

    If for any reason usage of a simple paragraph block is not possible, then you can hide the arrow and content of a specific Accordion block using this CSS code:

    #wp-block-themeisle-blocks-accordion-7caacf22 > details > summary::after {
        display: none;
    }
    
    #wp-block-themeisle-blocks-accordion-7caacf22 > details > div {
        display: none;
    }

    Note that you would need to replace the ID in this code to match the unique ID of the accordion that you would like to adjust and repeat the process every time you need to adjust a new accordion. This is why if you have the ability to use a Paragraph, I warmly suggest opting for that solution.

    I hope this helps, have a nice day,
    Andrija

Viewing 1 replies (of 1 total)
  • The topic ‘Accordion and empty content part’ is closed to new replies.