Off-Canvas Sidebars & Menus (Slidebars)


This plugin will add various options to implement off-canvas sidebars in your WordPress theme based on the Slidebars jQuery plugin.

Overview / Features

  • Add off-canvas sidebars to the left, right, top and bottom of your website.
  • Use sidebar areas (widget-ready areas), menu locations or custom hooks to place content into the off-canvas sidebars.
  • You can add control buttons with a widget, menu item, shortcode or with custom code.
  • Various customisation options and settings available in the Appearances menu.
  • Extensive API for PHP and JS.

Compatibility (IMPORTANT!)

The structure of your theme is of great importance for this plugin. Please read the installation guide carefully!!

This plugin should work with most themes and plugins although I can’t be sure for all use-cases. Also note that at this point it’s still a 0.x version…
If the plugin does not work for your theme, please let me know through the support and add a plugins and themes list and I will take a look!

Fixed elements (like sticky menu’s)
There are known issues with fixed elements and Slidebars. Click here for more information
I’ve created two possible solutions for this:

  1. Legacy CSS solution. Use basic CSS2 positioning instead of CSS3 transform with hardware acceleration.
  2. JavaScript solution. It is slower but still allows the use of hardware acceleration for animations.

It’s not working! / I found a bug!

Please let me know through support and add a plugins and themes list! 🙂
Or submit an issue here on GitHub


  • Slidebars jQuery plugin by Adam, thank you for this great plugin!

You can find me here:

Actions | Filters | API


  • Slidebars jQuery plugin by Adam, thank you for this great plugin!


Please let me know through the support page!


  • Settings page
  • Sidebars settings page (sidebars closed)
  • Sidebars settings page (sidebar opened)
  • Shortcode generator page
  • Control Widget
  • Menu item
  • Sidebar left (Push effect) -> image from Slidebars website
  • Sidebar left (Overlay effect) -> image from Slidebars website
  • Sidebar top (Push effect) -> image from Slidebars website


Installation of this plugin works like any other plugin out there. Either:

  1. Upload the zip file to the ‘/wp-content/plugins/’ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

Or search for “Off-Canvas Sidebars” via your plugins menu.

Theme Setup

Off-Canvas Sidebars won’t work “out of the box” with most themes, please read the documentation!
Click here for theme setup documentation.


1. Will this plugin work with any theme?

No, due to the difference in structure not all theme’s are compatible.
Though most themes can be made compatible with some modifications!

2. Can I add as many sidebars as I like?

Yes you can, keep in mind that the more sidebars you add the heavier the load on the server (PHP) and browser (JS) will be.

3. How do I change the CSS for the sidebars?

This plugin only provides the framework that handles the off-canvas part.
There are some settings that slightly change the display but this is very limited.
For more advanced customisations either:
1. Edit your theme style.css file (usually located in /wp-content/themes/YOURTHEME/).
2. Use a plugin such as Simple Custom CSS.


April 17, 2019
Initially missed the installation instructions to add code snippets, but once I did it worked beautifully. Very much appreciated the toggle to make the slidebars work with fixed elements- nice attention to detail.
February 19, 2019
The key question when installing the plugin is the two Frontend Settings parameter as described in the 'Simple theme setup' instructions: It can be adapted to almost any theme, but you usually have to touch the header.php and footer.php adding two lines of code. That's why the advice to do that on a child theme. It can be issue when you have sticky header (fixed header) and want to scroll on the page. The header will not be fixed but moving when scrolling despite you use fixed header. In my case it was solved easily changing the Frontend Settings according to the plugin official wordpress page: Legacy CSS solution. Use basic CSS2 positioning instead of CSS3 transform with hardware acceleration. My advice is: read the documentation from the developer and you will be happy with this wonderful solution. Works well on mobile phones too.
October 10, 2018
This is the easiest off canvas sidebar installation I have found. As someone who is learning about developement I would say instructions are decent and I got the plugin working without issue. One thing to know for installtion instructions is 1. Add the before hook, 2. Add the after, and 3. Add the html to where you want the button and then CSS until beautiful! The main instuctions leave some of the install unknown if your not super understanding of developement requirements. So far, this is only plugin I have been able to get working and love it.
September 7, 2018
Spent hours trying to get this to work. The toggle items/buttons appear on page but don't trigger. Followed the install instructions and added the additional code in the theme files with a fresh install, no reaction.
Read all 19 reviews

Contributors & Developers

“Off-Canvas Sidebars & Menus (Slidebars)” is open source software. The following people have contributed to this plugin.


“Off-Canvas Sidebars & Menus (Slidebars)” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “Off-Canvas Sidebars & Menus (Slidebars)” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Compatibility: Support wp_body_open as website_before hook introduced in WordPress 5.2. #70
  • Enhancement: Allow Genesis Framework hooks to be overwritten in respect for wp_body_open.
  • Enhancement: Use CSS vh unit for canvas container min-height instead of JavaScript.
  • Enhancement: Better use of WP core UI elements.
  • Enhancement: Code quality improvements.

Detailed info: PR on GitHub


  • Enhancement: Don’t render triggers of disabled sidebars if auto-hide is enabled. #56
  • Enhancement: Support wp_footer as website_after hook. (Not compatible with all themes!)
  • Enhancement: Filters to overwrite website_before and website_after hook priorities.
  • Enhancement: Do not render inactive trigger buttons if auto-hide is enabled.

Detailed info: PR on GitHub


  • Feature: New filter: ocs_is_sidebar_enabled to filter whether a sidebar should be rendered or not.
  • Enhancement/Refactoring: Class autoloader.


  • Fix: Bug with creating sidebars on a new installation. #52
  • Enhancement/Refactoring: Control trigger rendering.

Detailed info: PR on GitHub


  • Feature: Make closing the slidebar after clicking a link an option. #47 & #48
  • Feature: Add icon options in control trigger API and shortcode.
  • Feature: Enhance widget UI with advanced options for control triggers. #27
  • Enhancement: Setting page JS and UI enhancements.
  • Enhancement: Use data attributes to conform W3C HTML5 specifications. #50
  • Enhancement: Add support links on plugins overview page.
  • Refactoring: Separate classes for tabs, page and settings/validation. Enhances plugin option validation. #38
  • Refactoring: Global OCS_DOMAIN constant.
  • Updated/Added: Screenshots.

Detailed info: PR on GitHub


  • Enhancement: Keep scrollbar visible when scroll lock is active. #44 & PR #45
  • Enhancement: (Slidebars library) Make sure that percentage based widths are rounded to actual pixels to prevent 1px differences on display.
  • Fix: PHP Notice on fixed_elements key.
  • Compatibility: Tested with WordPress 4.9

Detailed info: PR on GitHub


  • Fix: Loading the correct menu in an off-canvas sidebar was not working correctly. #37
  • Fix: Scroll lock feature with CSS instead of JavaScript. #39
  • Enhancement: Add active sidebar ID to the html element classes. #41

Detailed info: PR on GitHub


  • Feature: [ocs_trigger] shortcode to display trigger buttons/elements anywhere you like, click here for documentation. #24
    • Shortcode generator available in the settings page.
    • Integrate a shortcode generator with the WP Editor. #32
  • Enhancement: New “Legacy CSS” mode. Modified the Slidebars library to support older CSS2 animations. Can fix a lot of issues with fixed elements. #26
  • Compatibility: Modified the default Slidebars CSS to support anchor links and common smooth scroll implementations.
  • Compatibility: Some enhancements for compatibility with the WP Admin Bar.
  • UI: Improve widget UI #27
  • Fix: Enhance the codebase to be more aligned with the WP coding standards with CodeClimate.

Detailed info: PR on GitHub

  • Fix: Settings page checkbox bug when saving


  • Feature: Allow changing this plugin capability to show the settings page
  • Fix: Update fixed element compat for the new Slidebars version (still experimental, Slidebars still doesn’t fully support fixed elements within the site container)
  • Fix: Don’t echo empty sidebar CSS selectors if no styles are set
  • UI: Set .ocs-button to cursor: pointer; by default
  • Update textdomain hook

Detailed info: PR on GitHub


  • Feature: Allow sidebars to overwrite some general settings
  • Feature: Option to set padding to sidebars
  • Feature: Option to choose other content types than only a WP sidebar for an off-canvas sidebar
  • Feature: Option to set your own CSS prefix (some classes are fixes to ocs and can’t be changed, the prefix ocs is also the default prefix for new installations)
  • Feature: Added various actions, filters and JS hooks – Click here for info
  • Feature: OCS API functions to output off canvas sidebars in your theme instead of using this plugin frontend functions – Click here for info
  • Fix: Sidebar ID validation wasn’t correct

Detailed info: PR on GitHub


  • Feature: Option to set the animation speed for sidebars
  • Feature: Option to use the FastClick library – Click here for info
  • Fix: Disabling sidebars on global settings page didn’t work


  • Fix: Add touch events for iOS mobile device compatibility
  • Enhancement: Added some actions for front-end (see Other Notes)

  • Fix: Global variable bug
  • UI: Improve settings page


  • Update Slidebars plugin to v2.0.2: click here for info
  • Feature: An unlimited amount of off-canvas sidebars (No longer just one left, one right)
  • Feature: 2 new locations (top and bottom)
  • Feature: 2 new effects (reveal and shift)
  • UI: Improved settings pages
  • I18n: Translations are now managed at
  • Screenshots updated
  • Tested with WordPress 4.6


  • Feature: First experiment for compatibility with fixed elements within the site container with the use of transform: translateZ (needed for -webkit- and -moz- only). See problem here
  • Improvement: Usage of a single instance of the class


  • Feature: Added the option to change the website_before and website_after hook names


Created from nothingness just to be one of the cool kids. Yay!