I am facing a strange issue with my plugin. It can also be placed as a block when block widget mode is activated. The plugin has an accordion with four containers. Each container has its own form and actions. The default state of the accordion is all collapsed.

When I place this widget in classic mode, the accordion is behaving as it should, meaning all in collapsed state. However, when I place it in a block widget, by default all the container appear expanded. After about 20 seconds, all containers finally collapse to get to the desired result.

I have a fresh copy of WordPress (6.2.2) and has no plugin installed except this one. The theme I am using for testing is 2021.


WordPress version: 6.2.2 (Latest)
Installed plugins: 1 (the one I am working on)
Widget editor type: Block
Theme: Twenty-Twentyone
Theme version: 1.8 (Latest)
OS: Ubuntu
Browser: Firefox

The following screen capture shows how everything works. https://youtu.be/kDYlmGwgdYc

  • can you edit your question to include everything in the post itself? We should not ened to go offsite and watch a video to understand your question. What do you mean by classic mode? You can't insert plugins, do you mean a widget? There are no images or code in your question to debug, and the video is too blurry/low resolution to see anything. Without the code it's not possible to answer this question, use the edit link to update it
    – Tom J Nowell
    Commented Aug 4, 2023 at 13:48


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.