Off-Canavas sidebar should remain open when clicking shop filters

This topic has 6 replies, 2 voices, and was last updated 2 weeks, 2 days ago ago by Jack Richardson

  • Avatar: Andri
    Andri
    Participant
    February 5, 2026 at 07:56

    Hello

    I have an off-canvas sidebar with shop filter widgets (categories list with checkboxes etc) on my Shop page, usung Ajax filters. User clicks “Open filters” button first to open the sidebar. But there’s an issue, the off-canvas sidebar closes automatically after user has clicked on one checkbox. If user wants to make multiple selections at once, it’s not possible, they have to open the sidebar again for each click. I need the solution where sidebar closes only when user means to close it.

    Best regards,

    5 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    February 5, 2026 at 13:25

    Hello @Andri,

    Could you please provide us with a video demonstrating the issue so that we can determine whether you are using the default shop layout or a prebuilt one based on the Elementor builder?

    Additionally, you may try the following solution: add the “Apply All Filters” widget to the top of your sidebar area (https://gyazo.com/f3d0297991f5144a19e9a639ae53ce94). This will produce the desired result, as the sidebar will remain open while you select filters and will only close once you click the “Apply Filters” button.

    Best regards,
    Jack Richardson
    The 8Theme’s Team

    Avatar: Andri
    Andri
    Participant
    February 5, 2026 at 14:20

    Hello

    Thank you for the quick reply, I have added a video link to the private content area. Page is composed with Elementor builder. I’m aware of the “Apply filters” button widget, adding this does indeed keep the sidebar open, but since without the button the shop filters are interactive and fast, it would’nt be good to go back to somewhat older approach where filtering required an additional click from the user.

    Best regards,

    Please contact administrator
    for this information.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    February 5, 2026 at 17:06

    Hello @Andri,

    Any filter action performed from the sidebar triggers the product filtering process, which causes the sidebar to close. This behavior is correct. Could you please also attach a video showing how the previously mentioned solution works when applied to your sidebar content (the “Apply All Filters” button)? We will review our code to determine whether it is possible to implement a solution that keeps the sidebar open without using the requested widget, and we will provide you with feedback accordingly.

    Best regards,
    Jack Richardson
    8Theme Team

    Avatar: Andri
    Andri
    Participant
    February 10, 2026 at 10:19

    Hello, thank you for the reply. I have added video of the behaviour with “Apply all filters” button the private section of this content. “Apply all filters” button functionality works well.

    About the previous video without the filters application button: I understand that from the technical point of view it may be correct, but from the usability side it’s a bug. Because, for example if I use the filters sidebar so it is always shown on the desktop and it converts to off-canvas on mobile (the option that I set from the elementor settings panel), the usability changes. The desktop user can choose multiple filters at once, but the mobile user can use only one filter at a time, reopening the sidebar each time. This is completely different behaviour and it’s incorrect. The user experience across all screen sizes should remain the same.
    In addition, when I add one sidebar for desktop without the “Apply all filters” button and another different sidebar for mobile devices with the button and use Responsive controls for showing/hiding each on the same page, then there’s another bug. The solution doesn’t work with multiple sidebars on the same page. Only the sidebar occurring in the dom tree first seems to work.

    It would be highly appreciated if you could review the code so the user experience on mobile and desktop could be unified without using “Apply filters” button!

    Best regards,

    Please contact administrator
    for this information.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    February 10, 2026 at 14:03

    Hello @Andri,

    Please download the files from the URL provided in the private area and upload them to your theme directory according to the paths specified for each file. Then, add the following PHP snippet:

    add_filter('etheme_off_canvas_autoclose_ajax_filters_action', '__return_false');
    add_action('wp_footer', function() { ?>
    	<script type="text/javascript">
    		jQuery(document).ready(function($) {
    			$(document).on('et_ajax_content_loaded', function() {
    				$('.elementor-widget-etheme_sidebar .etheme-elementor-off-canvas__toggle_button:visible').trigger('click');
    			});
    		});
    	</script>
    <?php });

    You can add this snippet to your child theme’s functions.php file or use a plugin for code snippets, such as https://wordpress.org/plugins/code-snippets/.

    Please note that during any AJAX action, most of the page content is reloaded and replaced with new data, which also replaces the off-canvas element and closes the toggle. The snippet above will ensure that it reopens automatically.
    Frontend result: https://gyazo.com/8f378cc6a09f0c6247eb0b37a6ff30c4

    Also, please note that we do not provide additional customization through our support forum. However, we always strive to assist our customers with small code snippets whenever possible.

    Best regards,
    Jack Richardson
    The 8Theme’s Team

    Please contact administrator
    for this information.
  • Viewing 6 results - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.