archive-services.php 1.78 KB
<?php
/*
    This is the services archives template
*/

    get_header();

    $column = 'col-md-9';

    if( 'full-width' == get_theme_mod( 'page_template', 'right-sidebar' ) && 'global' == get_theme_mod( 'services_archive_template', 'global' ) ){
        $column = 'col-md-12';
    } elseif( 'full-width' == get_theme_mod( 'services_archive_template', 'global' ) ) {
        $column = 'col-md-12';
    }

?>
    
    <div class="row">
        
        <?php 
            if( 'left-sidebar' == get_theme_mod( 'page_template', 'right-sidebar' ) && 'global' == get_theme_mod( 'services_archive_template', 'global' ) ){
                get_sidebar();
            } elseif( 'left-sidebar' == get_theme_mod( 'services_archive_template', 'global' ) ) {
                get_sidebar();
            }
            if( 'no-sidebar' == get_theme_mod( 'page_template', 'right-sidebar' ) && 'global' == get_theme_mod( 'services_archive_template', 'global' ) ) {
                $column = 'col-md-12';
            } elseif(  'no-sidebar' == get_theme_mod( 'services_archive_template', 'global' ) ) {
                $column = 'col-md-12';
            }
        ?>

        <div class="<?php echo esc_attr( $column ); ?> blog-grid">
            <div class="row news">
                
                <?php get_template_part( 'parts/content', 'archive-services' ); ?>

            </div>
        </div>

        <?php 

            if( 'right-sidebar' == get_theme_mod( 'page_template', 'right-sidebar' ) && 'global' == get_theme_mod( 'services_archive_template', 'global' ) ) {
                get_sidebar();
            } elseif(  'right-sidebar' == get_theme_mod( 'services_archive_template', 'global' ) ) {
                get_sidebar();
            }

        ?>

    </div>

<?php 

offshore_content_after();

get_footer(); 

?>