• Hi,

    I’m working on a child theme for Storefront. I’m unable to get the full width template working. The customizer settings set the body class as either right-sidebar or left-sidebar and I assumed that if the full-width template was used it would then apply ‘storefront-full-width-content’ through a the body_class filter?

    I’ve un-registered the sidebar already as I won’t be using it with this particular design, with

    // remove storefront sidebar
    function remove_storefront_sidebar() {
    	remove_action( 'storefront_sidebar',			'storefront_get_sidebar',			10 );
    }
    add_action( 'get_header', 'remove_storefront_sidebar' );

    But my main effort here as far as I can see is to be changing the body class. Some direction would be greatly appreciated,

    John

Viewing 1 replies (of 1 total)
  • Thread Starter John McCarthy

    (@john-lion)

    In reply to my own question…

    Although I understand a fair amount about WordPress development, knowledge gets lots in the brain.

    Basically to style the page using the body_class or <body class=””> you simply call the page name in css. For example: I wanted to style the home page which I have in my template files as Front-page.php. To style this page and make it full width using Store front, I simply needed to call

    .home {
    	.content-area {
    		@include span(full);
    	}
    }

    In the layout.scss file of my child theme. Glad have that cleared up, something I won’t be forgetting again 🙂

Viewing 1 replies (of 1 total)

The topic ‘WooCommerce – Body class’ is closed to new replies.