This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Full width doesn't show up

  • Creator
    Topic
  • #8704
    elianab
    Participant

    When I’m on a page in the backend there is a drop down menu that lists the type of sidebars you can have on the page. Usually it says, “Default Sidebar Layout, Full Width, Right Sidebar…and more”
    On my current site it only lists Default and Right Sidebar, no Full Width or anything else. I’m using version 1.0.2 and all of my plugins are up to date.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Author
    Replies
  • #8705
    Jason Bobich
    Keymaster

    You’re referring to this, right?

    There’s no plugin or anything out there that changes the sidebar layouts available, or that I can think of. I think this would have to be a result of something you’ve coded into your Child theme.

    Have you done anything with the “themeblvd_sidebar_layouts” filter? Maybe you attempted something you saw in this article? — http://dev.themeblvd.com/tutorial/sidebar-layouts/ — Possibly you thought you were making some edit to the “Sidebar Right” layout, but you did something incorrectly, resulting in all of the other sidebar layouts in the array the filter is attached to going away?

    If this is the case, feel free to post what you’re filtering onto “themeblvd_sidebar_layouts” and I can tell you where you’re going wrong so you can move forward.

    #8745
    elianab
    Participant

    You’re right, the problem was based on that tutorial. I wanted to change the width of the right sidebar, but in doing that I guess I got rid of all the other sidebars. If I want to redefine the width of just one sidebar, do I have to include all of the other choices as well? Here’s what I had:

    /*-------------------------------------------------------*/
    /* Change Default sidebar layout width
    /*-------------------------------------------------------*/
    function my_wide_sidebar( $layouts ){
       $layouts = array(
    		'sidebar_right' => array(
    			'name' 		=> 'Sidebar Right',
    			'id'		=> 'sidebar_right',
    			'columns'	=> array(
    				'content' 	=> 'span9',
    				'left' 		=> '',
    				'right' 	=> 'span3',
    			)
    		),
    		
    	);
         
        return $layouts;
    }
    add_filter( 'themeblvd_sidebar_layouts', 'my_wide_sidebar' );

    thanks, Eliana

    #8747
    Jason Bobich
    Keymaster

    The problem with your code is that you’re taking the entire $layouts array and re-defining it, opposed to just editing the “sidebar_right” part.

    This $layouts variable is already a big array containing all the sidebar layouts and attributes. So, you just want to get in there and modify the parts you want to change. In terms of PHP syntaxing there are several theoretical ways you could do this. Here’s one way that’ll accomplish what you’re going for:

    /*-------------------------------------------------------*/
    /* Change Default sidebar layout width
    /*-------------------------------------------------------*/
    function my_wide_sidebar( $layouts ){
    	
    	$layouts['sidebar_right']['columns]['content'] = 'span9';
    	$layouts['sidebar_right']['columns]['right'] = 'span3';
    
    	return $layouts;
    }
    add_filter( 'themeblvd_sidebar_layouts', 'my_wide_sidebar' );
    #8751
    elianab
    Participant

    Thanks so much. That did it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.