<?php // ============================================================================= // VIEWS/ETHOS/WP-SIDEBAR.PHP // ----------------------------------------------------------------------------- // Sidebar output for Ethos. // ============================================================================= ?> <?php if (x_get_content_layout() != 'full-width') { ?> <aside class="<?php x_sidebar_class(); ?> " role="complementary"> <?php if (get_option('ups_sidebars') != array()) { ?> <?php dynamic_sidebar(apply_filters('ups_sidebar', 'sidebar-main')); ?> <?php } else { ?> <?php dynamic_sidebar('sidebar-main'); ?> <?php }
function x_sidebar_class() { switch (x_get_content_layout()) { case 'content-sidebar': $output = 'x-sidebar right'; break; case 'sidebar-content': $output = 'x-sidebar left'; break; default: $output = 'x-sidebar right'; } echo $output; }