Beispiel #1
0
							<?php 
    if (is_active_sidebar_YA('below')) {
        ?>
								<div class="sidebar-below">
									<?php 
        dynamic_sidebar('below');
        ?>
								</div>
							<?php 
    }
    ?>
							
						</section>
						
						<?php 
    if ($right_sidebars = ya_sidebar_right()) {
        foreach ($right_sidebars as $sidebar) {
            get_template_part('templates/sidebar', $sidebar);
        }
    }
    ?>
					</div>
					<?php 
    if (is_active_sidebar_YA('below-main')) {
        ?>
						<div class="sidebar-below-main">
							<div class="row">
								<?php 
        dynamic_sidebar('below-main');
        ?>
							</div>
Beispiel #2
0
function ya_content_class()
{
    $classes = array('content');
    $all_sidebars = array_merge(ya_sidebar_left(), ya_sidebar_right());
    $all_sidebars = array_unique($all_sidebars);
    $span = 12;
    $span_md = 12;
    $span_sm = 12;
    foreach ($all_sidebars as $sb) {
        if (!is_active_sidebar_YA($sb)) {
            continue;
        }
        $sb_expand_field = 'sidebar_' . $sb . '_expand';
        $sb_expand_field_md = 'sidebar_' . $sb . '_expand_md';
        $sb_expand_field_sm = 'sidebar_' . $sb . '_expand_sm';
        $sb_expand_value = ya_options()->getCpanelValue($sb_expand_field);
        $sb_expand_value_md = ya_options()->getCpanelValue($sb_expand_field_md);
        $sb_expand_value_sm = ya_options()->getCpanelValue($sb_expand_field_sm);
        $span -= (int) $sb_expand_value;
        $span_md -= (int) $sb_expand_value_md;
        $span_sm -= (int) $sb_expand_value_sm;
    }
    if ($span <= 0 || $span_md <= 0 || $span_sm <= 0) {
        $classes[] = 'col-lg-12 col-md-12 col-sm-12';
    } else {
        $classes[] = 'col-lg-' . $span . ' col-md-' . $span_md . ' col-sm-' . $span_sm;
    }
    echo 'class="' . join(' ', $classes) . '"';
}