Dropping sidebars from Panels pages with panels 1 module

A few people at the Seattle DUG have asked me how to drop sidebars from panels generated pages. With Panels 2, this is made easy, just a configuration setting. However if you are using the original panels module, you’ll need to add a little snippet of code to your theme’s template.php file:

// Hide sidebars on panel pages
if (function_exists('panels_is_panels_page') && $vars['panels_page'] = panels_is_panels_page()) {
$vars['sidebar_left'] = '';
$vars['sidebar_right'] = '';
$body_classes[] = 'panels_page';

Discover more from Gregory Heller

Subscribe now to keep reading and get access to the full archive.

Continue reading