Support » Theme: UnderBoot » Hiding Sidebar – Content width is not at 100%

  • Resolved anotherbreed

    (@anotherbreed)


    Hi,

    I noticed that when you hide the Sidebar, the content is not stretched to the maximum width available. Here’s the current code:

    <div id="primary" class="content-area col-md-8 offset-md-2">

    Instead of being like this:

    <div id="primary" class="content-area col-md-12">

    Can we have an option to let the content fill the space when the Sidebar is hidden?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author Dmitry Dinev

    (@dimadinev)

    Hi,

    You can change this in your new theme, which you can create based on this one or in a child theme. I will consider your suggestion for a future update.

    Rgrds

    Theme Author Dmitry Dinev

    (@dimadinev)

    Hi again,

    Here is an example of how you can change this in a child theme

    /**
     * Example of underboot_set_content_class hooked.
     * see template-tags.php
     */
    function underboot_set_my_content_class( $classes ) {
    
    	if ( ! is_active_sidebar( 'sidebar-1' ) || get_theme_mod( 'sidebar_position' ) === 'none' ) {
    		if ( is_single() ) {
    			$classes = '';
    			$classes[] = 'col-md-12';
    		}
    	}
    
    	return array_unique( $classes );
    }
    add_filter( 'underboot_set_content_class', 'underboot_set_my_content_class' );
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.