Bootstrap collapse won't stay collapsed #2133
-
I am experiencing an issue where the menu will not close/toggle once opened/toggles when using a child theme. This issue does not occur when the parent theme is active. When .navbar-toggler is clicked, .navbar-collapse adds collapse.show to its class list as expected. However when you click the toggler again, .collapse.show switches to .collapsing (as expected) then back to .collapse.show instead of just .collapse. I've heard that this behavior can happen when popper is loaded separately from Bootstrap 5 - because it is already included in Bootstrap 5 and this effectively adds it twice... But I haven't been able to pinpoint if this is the case here. I have already tried downloading and installing a fresh copy of both the parent (v1.2.2) and child theme (v 1.2.0). The issue persists in the new or 'blank' child theme, but not in the parent theme. I have also tried switching to Bootstrap 4 in the customizer. However... if I spin up a brand new WP install then add the parent and child theme, the issue goes away... Is this conflict with a plugin or something else stored in the database? Any help is very appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
It seems I hinted at the problem/solution while trying to explain the issue. I indeed am having a plugin conflict but ONLY while using the child theme for Understrap. The plugin in question is Counter Number, which can be found here: https://wordpress.org/plugins/counter-number-showcase/. I haven't figured out WHY this plugin would cause an issue with the Bootstrap menu and ONLY when using the child theme... but disabling the plugin fixes the issue. |
Beta Was this translation helpful? Give feedback.
It seems I hinted at the problem/solution while trying to explain the issue. I indeed am having a plugin conflict but ONLY while using the child theme for Understrap. The plugin in question is Counter Number, which can be found here: https://wordpress.org/plugins/counter-number-showcase/. I haven't figured out WHY this plugin would cause an issue with the Bootstrap menu and ONLY when using the child theme... but disabling the plugin fixes the issue.