<?php
/**
 * Archive.php renders your categories, tags and archive pages
 * @package Ultra WordPress Theme
 * @since 1.0
 * @author AJ Clarke : http://wpexplorer.com
 * @copyright Copyright (c) 2012, AJ Clarke
 * @link http://wpexplorer.com
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 */

get_header(); // Loads the header.php template ?>

<header id="page-heading">
    <div class="boxed">
        <h1><?php echo single_term_title( ); ?></h1>
        <?php
        // Show category description
		if ( term_description() !== '' ) { ?>
            <div id="archive-description"><?php echo term_description( ); ?></div>
        <?php }
		// Yoast breadcrumbs support
		if( function_exists('yoast_breadcrumb') ) yoast_breadcrumb('<div id="breadcrumbs"><span class="icon-home"></span>','</div>'); ?>
	</div><!-- .boxed -->
</header><!-- #page-heading -->

<div id="blog-archive-wrap" class="boxed container clearfix">
	<?php
	// Add #post div on all blog styles except full-width
	if ( of_get_option('blog_entry_style','large_image') !== 'full_image') {
		echo '<div id="post" class="clearfix">';
	}
	
		if( have_posts()) : // Start loop
			while (have_posts()) : the_post();
				get_template_part( 'content', get_post_format() ); //get the post content  
			endwhile;
			wpex_pagination(); // Paginate your posts
		endif;
		
	// Close #post div on all blog styles except full-width & get sidebar
    if ( of_get_option('blog_entry_style','large_image') !== 'full_image') {
		echo '</div>';
		get_sidebar(); // Loads the sidebar.php file
	} ?>
</div><!-- #blog-template-content -->

<?php get_footer(); // Loads the footer.php file ?>