Split Theme Hide The Sidebar On Mobile

Hiding sidebar content on mobile (smaller viewports)

A customer recently asked for a way to hide the sidebar content on mobile viewports in the Split theme.

This seemed reasonable as the layout often looks better without the sidebar in the this theme on smaller devices. The option to do this is not exposed in the theme options, so we have come up with a little snippet to achieve this effect for all our loyal Split fans.

Just add this snippet to the page level Javascript code container on the page(s) you would like this to happen on. Or place it in the RW7 global javascript code container to achieve this effect right across your site.

Here is the snippet:

$(document).ready(function(){     
  if ($(window).width() <= 800) {        
    $("#aside").hide();    
  }
});

In this example, where the viewport is equal to or less than 800px the sidebar will be removed. This can be changed to whatever width you would like. 

This snippet is supplied without promise or warranty, we have tested it of course but we cannot guarantee that it will work under every use case.

Enjoy!

Still need help? Contact Us Contact Us