<?php 
/**
 * @package WordPress
 * @subpackage Campoal
 */

global $campoal_options;
global $post;

get_header();

$sidebar_position = isset($campoal_options['conikal_sidebar_field']) ? $campoal_options['conikal_sidebar_field'] : 'right';
$show_bc = isset($campoal_options['conikal_breadcrumbs_field']) ? $campoal_options['conikal_breadcrumbs_field'] : 0;
?>
<div id="wrapper">
    <div class="ui container">
        <div class="page content">
            <div class="ui relaxed grid">
                <?php if(is_active_sidebar('main-widget-area') && $sidebar_position == 'left') { ?>
                <div class="five wide column computer only">
                    <?php get_sidebar(); ?>
                </div>
                <?php } ?>
                <div class="sixteen wide mobile sixteen wide tablet <?php echo esc_attr(is_active_sidebar('main-widget-area') ? 'eleven' : 'sixteen') ?> wide computer column" id="content">
                    <div class="ui secondary menu petition-taxonomy-breadcrumbs">
                        <?php if($show_bc == 1) {
                            conikal_petition_breadcrumbs();
                        } else {
                            print '<div class="none-breadcrumb"></div>';
                        } ?>
                        <div class="right menu">
                            <?php get_template_part('templates/sorting-options') ?>
                        </div>
                    </div>
                    <div class="ui hidden divider"></div>
                    <?php
                    /*
                     * Loop post content template
                     * If you want to override this in a child theme, then include a file
                     */
                    get_template_part('loop/loop-post', 'content'); ?>
                </div>
                <?php if(is_active_sidebar('main-widget-area') && $sidebar_position == 'right') { ?>
                <div class="five wide column computer only">
                    <?php get_sidebar(); ?>
                </div>
                <?php } ?>
            </div>
        </div>
    </div>
</div>

<?php get_footer(); ?>