[Resolved] collapsible text

Home Forums Support [Resolved] collapsible text

Home Forums Support collapsible text

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1283474
    Anil

    hi can i add collapsible text with generateblocks?
    something q/a or faq or expand/collapse area of text….

    Regards

    #1284049
    David
    Staff
    Customer Support

    Hi there,

    if jQuery isn’t a problem then this topic provides a solution:

    https://generatepress.com/forums/topic/collapse-button/#post-1194173

    If you see the HTML being used you can simply substitute that with a Headline block and a Container Block – each of which you can add the respective Additional CSS Classes ( select the block and you will find this field in the Settings Sidebar under Advanced).

    #1284103
    Anil

    Thanks David, I’ll try that.
    Initially, that is looking lot of work to do…
    It would be better if some plugin must handle all that work…
    Regards.

    #1284544
    David
    Staff
    Customer Support

    There are plenty of plugins for Accordion / Concertinas. But nothing in GenerateBlocks.
    The JS and CSS only needs to be added to your site once.

    For the content.
    I would first create a single Headline followed by a single Container block, put in some dummy content, style them and add the Additional CSS classes.

    Once i was happy i would select both blocks – by shift clicking the two ( Gutenberg can be a little fiddly with this ).

    When both are selected you can select Add to Reusable Blocks from the 3 dot menu in the toolbar.

    Then whenever you need to add collapisble blocks simply add New Block > re-usable block.
    Then From the blocks toolbar 3 dot menu now: Convert to Regular Block so you can edit the content.

    You can then duplicate the Headline and Container blocks from the same menu to create a stack of them 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.