How to spice up any accordion feature on your website!
Accordions are a great tool to display tailored information for your sites users. With it, users can read the title or brief synopsis of the material inside, without taking up a large chunk of space.
Unfortunately, by default WordPress auto-opens the topmost section whenever your website is loaded, such as is shown in the image provided.
Thankfully, there is a way to bypass this without too much hassle, and all it takes is two simple words.
Second Toggle Tab
When making your accordion, first create a toggle that will serve as the invisible tab.
In the advanced tab under Custom CSS for that toggle, write “display: none;” (sans quotes) into the tabs – depending on which aspect of the toggle you’d prefer to hide.
- Main Element
- Open Toggle
- Toggle Title
- Toggle Icon
- Toggle Content
To ensure that there is no way of accidentally viewing this tab, it is recommended to write the code into all the boxes.
Hopefully, this guide will have been some use to you. Please, let us know if you have any questions or concerns about this material. Leave us a comment down below, or email us at firstname.lastname@example.org