Last active
November 15, 2024 00:17
-
-
Save thesmart/40c40f26fc9179c0ab4ac7f36d13d209 to your computer and use it in GitHub Desktop.
Opens all accordion content sections on a wordpress site.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const contentWrappers = document.querySelectorAll('.wp-block-getwid-accordion__content-wrapper'); | |
contentWrappers.forEach((wrapper) => { | |
wrapper.style.display = 'block'; | |
wrapper.style.height = 'auto'; | |
wrapper.ariaHidden = undefined; | |
wrapper.inert = false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instructions for use:
Step 1: Open the Developer Tools
Alternatively, you can press the following keyboard shortcuts to open the Developer Tools:
Step 2: Switch to the Console Tab
In the Developer Tools window, click on the Console tab.
If you don't see the Console tab, click on the >> icon (three horizontal lines) in the top-right corner of the Developer Tools window and select Console from the dropdown menu.
Step 3: Run the JavaScript Code
Copy and paste the javascript code and hit enter to run the code. Click
X
to close the tools menu.