if(is_active_sidebar('sidebar-1')||is_active_sidebar('sidebar-2')){

    if(is_active_sidebar('sidebar-1')&&!is_active_sidebar('sidebar-2')||!is_active_sidebar('sidebar-1')&&is_active_sidebar('sidebar-2'))$gridCss='col-full';

    elseif(is_active_sidebar('sidebar-1')&&is_active_sidebar('sidebar-2'))$gridCss='col-half';

    if(is_active_sidebar('sidebar-1')){

        ?>

            <div class="<?phpecho$gridCss;?>">

                <?phpdynamic_sidebar('sidebar-1');?>

            </div>

        <?php

    }

    if(is_active_sidebar('sidebar-2')){

        ?>

            <div class="<?phpecho$gridCss;?>">

                <?phpdynamic_sidebar('sidebar-2');?>

            </div>

        <?php

    }

}