A collapsible sidebar menu offers a streamlined way to access essential links and content, ensuring your website remains visually appealing and well-structured.
This functionality empowers users to expand or collapse the menu, enhancing their navigation experience.
Many prominent websites, eCommerce platforms, and those with intricate layouts utilize this feature to simplify navigation.
In this guide, we will demonstrate how to effortlessly create a collapsible sidebar menu in WordPress.
💡Quick Tip: How to Implement a Collapsible Sidebar Menu in WordPress
The simplest method to add a collapsible sidebar menu is by using the Bellows Accordion Menu plugin.
This plugin enables you to create a multi-level menu within your dashboard and easily integrate it into your sidebar using a straightforward shortcode.
Understanding Collapsible Sidebar Menus: When and Why to Use Them
A collapsible sidebar menu, also known as an expandable menu, is a navigation tool that conceals sub-items until a user clicks to display them. It arranges links in a ‘parent-child’ hierarchy, maintaining a tidy site layout.
We frequently suggest collapsible menus for extensive websites or eCommerce sites. Here’s why they are beneficial:
- Streamline Complex Layouts:They help organize numerous categories or pages without overwhelming users.
- Optimize Screen Space:By concealing sub-items, you maintain a clean and concise sidebar.
- Enhance Mobile Usability:They spare mobile users from scrolling through long lists of links.
For instance, the Guardian news website employs a collapsible menu on its mobile platform to effectively manage its various news categories.
Now, let’s explore how you can effortlessly create a collapsible sidebar menu on your WordPress website.
Creating a Collapsible Sidebar Menu in WordPress
You can build a collapsible sidebar menu in WordPress using the Bellows Accordion Menu plugin.
This plugin offers a convenient shortcode that allows you to insert your collapsible menu on any page, post, or widget area, including your sidebar.
Important Note:This plugin is intended for use with classic themes.
Step 1: Install and Activate the Bellows Accordion Plugin
First, you need to install and activate the Bellows Accordion Menu plugin. If you require assistance, please refer to our beginner’s guide on installing a WordPress plugin.
Step 2: Create a New Menu
After activation, navigate to theAppearance » Menussection in your WordPress dashboard.
Enter a name for your menu in the ‘Menu Name’ field, then click the ‘Create Menu’ button.
Step 3: Add and Organize Menu Items
Select the pages you wish to include from the left column and click ‘Add to Menu’.
To view a complete list of all your website’s pages, click on the ‘View All’ tab. For further instructions, refer to our guide on adding a navigation menu in WordPress.
To achieve the collapsible effect, arrange the items in a parent-child hierarchy. Drag a page item slightly to the right under a parent item.
Continue dragging it to the right until you see the dashed outline move inward. This indicates that the item is now a sub-item, which will remain hidden until the parent is clicked.
Now, when a visitor clicks on a parent item in your collapsible menu, it will expand to show all the child content.
Remember to click the ‘Save Menu’ button once you are done.
Step 4: Retrieve the Menu Shortcode
Next, we will add this collapsible menu to the WordPress sidebar using shortcodes generated automatically by Bellows Accordion.
To obtain the shortcode, navigate to theAppearance » Bellows MenuNavigate to the page in the WordPress dashboard. If the ‘Show All’ tab is not selected, please select it.
Click on the Shortcode box to highlight the entire code. Then, copy this code using the Command + C or Ctrl + C keyboard shortcut.
Step 5: Integrate the Menu into Your Sidebar
Next, we need to incorporate the menu into your site layout. Go to the Appearance » Widgetssection in the WordPress admin area.
This will show all the widget areas available in your current theme. The options may differ, but most modern WordPress themes include a sidebar.
Locate the sidebar widget area and click the ‘+’ icon to add a new block.
Search for ‘Shortcode’ and select the corresponding block.
Paste the shortcode you copied into the block and click ‘Update’. When you visit your site, your new collapsible menu should now be visible.
On mobile devices, this sidebar usually appears at the bottom of the page, where the collapsible feature effectively conserves vertical scrolling space.
Step 6: Personalize Your Collapsible Menu
The Bellows Accordion plugin simplifies the customization of this default menu. For instance, you can modify its color scheme to align better with your site’s branding.
To modify the default menu, navigate to the Appearance » BellowsMenu section in your WordPress dashboard.
This section contains all the options necessary to personalize your collapsible menu. There are numerous settings to explore, but you might want to begin with Main Configuration » Basic Configuration.
Here, you can select from various menu colors and decide if visitors can expand multiple submenus simultaneously using the ‘Accordion Folding’ feature.
To adjust the menu’s alignment and width, click on the ‘Layout & Position’ tab.
If you want to see your changes in real-time, you can edit the collapsible sidebar menu using the WordPress Customizer.
To access this, go to the Appearance » Customize section in the admin area and choose the ‘Bellows’ tab from the left sidebar.
In this section, you will find various settings for your sidebar, including options to modify its width, alignment, and the color of your collapsible sidebar menu.
Bonus: Effective WordPress Sidebar Strategies for Optimal Results
After creating your collapsible sidebar menu, you can implement additional strategies to maximize lead generation through your sidebar.
You can make your sidebar widget sticky, ensuring it remains visible as users scroll down the page.
Additionally, consider adding a contact form or an email sign-up form in your sidebar to grow your email list. WPForms is an excellent choice for this purpose, as it is the leading contact form plugin available.
At CanadaCreate, we utilize WPForms for creating contact forms and conducting annual surveys, and we highly recommend it. For more information, check out our comprehensive WPForms review.
Simply create a form and insert it into your sidebar using the WPForms block available in the block menu.
For detailed guidance, refer to our tutorial on how to create a contact form in WordPress.
You can also showcase your most popular posts in the sidebar, include images, display social media icons, and provide social proof. This approach will encourage users to explore your site further and increase your conversion rates.
For additional tips, check out our compilation of the best WordPress sidebar strategies to achieve optimal results.
Common Questions About Collapsible Sidebar Menus in WordPress
Here are some common questions our readers have asked about adding a collapsible sidebar menu to their websites:
How can I collapse a menu in WordPress?
To collapse a menu in WordPress, you can use a plugin like Bellows Accordion Menu. By default, WordPress menus do not support this feature on desktop screens, but a plugin can add the necessary functionality to allow items to expand and collapse when clicked.
How do I create a collapsible section in WordPress?
The simplest method is to use the built-in WordPress ‘Details’ block. This block allows you to wrap content inside a clickable summary line. For more advanced styling options within your posts, consider using a specialized accordion plugin.
How can I create a dropdown menu in WordPress?
You can create a dropdown menu by navigating to Appearance » Menus in your dashboard. Just drag a menu item slightly to the right beneath a parent link. This indentation indicates to WordPress that the item should be displayed in a dropdown list.
For more information, check out our tutorial on creating a dropdown menu in WordPress.
How can I arrange elements side by side in WordPress?
You can arrange elements side by side using the Columns block. In the block editor, select ‘Columns’ and choose your desired layout. Then, simply add your text or images to each column.
What is the Accordion Block Plugin for WordPress?
An accordion block plugin enables you to incorporate collapsible content sections into your posts, helping to organize lengthy content by concealing text under headings. Users can easily click on the headings to access the information they need.
If you’re looking to add accordions to your website, check out our top recommendations for the best WordPress accordion plugins available.
We hope this article has guided you in creating a collapsible sidebar menu in WordPress. For additional tips on enhancing your WordPress site design, explore our guides on customizing your WordPress header and discovering the most useful WordPress widgets for your site.



