Support » Theme: Kerli lite » Sidebar rmmoval?

Viewing 2 replies - 1 through 2 (of 2 total)
  • from the codding of sidebar.php, it should disappear when you have all widgets removed from ‘appearance – widgets’ area.
    unfortunately, this is not carried through into changing the layout, for example by changing the body_class as a basis for a CSS applied to ‘no-sidebar’ situations.

    you can fix that with some coding:

    in a child theme, add this into functions.php:

    add_filter( 'body_class', 'no_sidebar_class' );
    function no_sidebar_class( $classes ) {
    	if (   ! is_active_sidebar( 'sidebar-1' ) ) $classes[] = 'no-sidebar';
    	return $classes;

    then add this into style.css of the child theme:

    .no-sidebar .column.two-thirds { width: 100%; }

    Thanks Michael. I’ll have to learn this as it’s over my head. I’m new to this and know nothing about coding…. yet. 🙁

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sidebar rmmoval?’ is closed to new replies.