Adjusting sidebar width on page only

  • BigBlueMan

    #8295

    I’m using a standard 3 column setup on a site I’m developing.

    On one set of pages, I’m switching to a 2 column design. With the two column design, the sidebar is too wide. Is there a way to adjust the width of the sidebar on those pages only?

    Thanks!

    ed

    Mod

    Kenneth John Odle

    #40865

    Try adjusting the sliders under Graphene Options >> Display Options >> Width

    Prasanna SP

    #40866

    Possible with a child theme.

    function custom_page_col_width(){
    global $graphene_settings;
    if ( is_page(array(10,20,30)) ) {
    $graphene_settings['column_width']['two_col']['content'] = 640;
    $graphene_settings['column_width']['two_col']['sidebar'] = 280;
    }
    }
    add_action( 'template_redirect', 'custom_page_col_width' );

    Replace 10,20,30 with the ID of those pages.

    640 is the content width in pixels and 280 is the sidebar width in pixels. You need to change those according to your design requirements. Make sure those numbers do not sum up to more than the container width – gutter width.

    Untested. Should work though..

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.