• Resolved thesinglegourmet

    (@thesinglegourmet)


    I use a plugin to create shortcodes that display HTML text when inserted. If I use a shortcode that has one line (such as company_name) in either the question or the answer, it works as expected.

    However, if I use a shortcode that displays many lines of HTML (such as refund_policy) the accordion effect does not apply to most or all of the text generated by the shortcode.

    To clarify: if the content of the answer is

    lorem ipsum [refund_policy] dolor sit amet

    When using Code Snippets Pro, “lorem ipsum” is hidden and shown with the accordion effect. All text in the HTML snippet is always displayed, and the left padding setting is not respected.

    When using Post Snippets (free), “lorem ipsum” and the text in the HTML snippet before the first <p> tag are hidden and shown with the accordion effect. All other text generated by the shortcode is always displayed, and the left padding setting is not respected.

    • This topic was modified 11 months, 3 weeks ago by thesinglegourmet. Reason: typo
    • This topic was modified 11 months, 3 weeks ago by thesinglegourmet. Reason: clarity

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Please note! I’m not representing the developer.

    The FAQ block has quite a few limitations in its current state (I wouldn’t consider it ready for production use). One of the limitations is that each panel may only contain a single paragraph. This is probably the cause of your issue. The solution is to, before returning your shortcode, combining the shortcode’s generated paragraph tags into one and separating them using two <br /> tags. This is not something I would recommend, but if you want to use the block despite its immature state, this workaround will probably do the job.

    Thread Starter thesinglegourmet

    (@thesinglegourmet)

    Hi @karlemilnikka, thanks for your suggestion. The same thought occurred to me, and I tried it using <br> tags, with similar results.

    Plugin Support mohsinbsf

    (@mohsinbsf)

    Hi @thesinglegourmet,

    Sorry for the inconvenience caused to you.

    To expedite the resolution of the issue you’ve encountered, could you kindly provide the URL for the specific plugin in question? Additionally, it would greatly assist me in troubleshooting if you could outline the step-by-step process you followed on your site to replicate the issue.

    Your cooperation is invaluable, and I am eager to ensure a swift resolution to any challenges you may be facing. I appreciate your prompt response.

    Have a nice day!

    Thread Starter thesinglegourmet

    (@thesinglegourmet)

    The two plugins with which this is happening with me are

    These URLs were trivially easy to look up.

    Steps to reproduce (this should take you no more than 10 minutes):

    1. Set up website with Astra theme, and the following plugins: Spectra and Post Snippets (or Code Snippets).
    2. Create an HTML snippet that uses <p> or <br> tags. Make a note of the shortcode.
    3. Create FAQ using the FAQ block provided by Spectra.
    4. In one of the “answers”, enter this text: lorem ipsum [shortcode] dolor sit amet.
    5. View page with FAQ
    Plugin Support mohsinbsf

    (@mohsinbsf)

    Hi @thesinglegourmet,

    Thanks for the detail. I have replicated the issue and passed on the details to our developers to investigate the issue in detail. Rest assured, I will get back to you as soon as I receive an update from them. Till then, I appreciate your patience and understanding in this matter.

    Have a nice day!

    Plugin Support mohsinbsf

    (@mohsinbsf)

    Hi?@thesinglegourmet,

    The dev team has added the task to the tasks list. We will release an updated version of the plugin as soon as it is done.

    Have a nice day!

    karlemilnikka

    (@karlemilnikka)

    Sounds great, @mohsinbsf. Does that mean the FAQ block will be updated to use paragraphs (and potentially also other blocks) so that the content can be structured in the correct way, i.e., not relying on <br> for breaking up longer texts into paragraphs?

    Plugin Support mohsinbsf

    (@mohsinbsf)

    Hi @karlemilnikka,

    I am afraid at the moment, I could not confirm the approach that will be adopted to fix the issue. However, in future if you use the paragraph or br tag for log text in the FAQ block, it will work fine.

    Have a nice day!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Bug: accordion style FAQ always displays answer under certain condition’ is closed to new replies.