<?php get_header(); ?>

	<div class="wishbone_page_info">
		<div class="row">
			<div class="large-12 column text-center">
				<h1 class="page-title">
					<?php
						if ( is_day() ) :
							printf( 
								wp_kses( 
									__( '<em>Daily Archives:</em>%s', 'jt-wishbone' ), 
									array( 'em'=> array() )
								), get_the_date() 
							);

						elseif ( is_month() ) :
							printf( 
								wp_kses( 
									__( '<em>Monthly Archives:</em>%s', 'jt-wishbone' ), 
									array( 'em'=> array() )
								), get_the_date( _x( 'F Y', 'monthly archives date format', 'jt-wishbone' ) ) 
							);

						elseif ( is_year() ) :
							printf( 
								wp_kses( 
									__( '<em>Yearly Archives:</em>%s', 'jt-wishbone' ), 
									array( 'em'=> array() )
								), get_the_date( _x( 'Y', 'yearly archives date format', 'jt-wishbone' ) ) 
							);
						else :
							esc_html_e( 'Archives', 'jt-wishbone' );
						endif;
					?>
				</h1>
			</div>
		</div>
	</div>

	<?php

	$showslider 	= wishbone_option('archives_showslider');
	$slidetype 		= wishbone_option('archives_home-slide-type');
	$p_number 		= wishbone_option('archives_fetchnumb');
	$postlayout		= wishbone_option('archives_home-post-layout', 'default');
	$pagingtype		= wishbone_option('pagingtype');
	$sidebarpos 	= wishbone_option('archives_homesidebar', 'right-sidebar'); //Values: no-sidebar, right-sidebar, left-sidebar

	if( wishbone_option('archives_slider_tags') ){
		$p_tags = wishbone_option('archives_slider_tags');
	} else {
		$p_tags = null;
	}

	if ( $showslider == 1 && !is_paged() ):
		switch ($slidetype) {
			case 'wishbonecarousel':
				wishbone_wishbone_carousel( $p_number, $p_tags ); 
				break;
			
			case 'wideslider':
				wishbone_wideslider( $p_number, $p_tags ); 
				break;
			
			case 'grid':
				wishbone_gridhero( $p_number, $p_tags ); 
				break;
			
			case 'twocol':
				wishbone_twocol_slider( $p_number, $p_tags ); 
				break;

			case 'onecol':
				wishbone_onecol_slider( $p_number, $p_tags );
				break;

			default:
				# code...
				break;
		}
	endif; 

	if( 'no-sidebar' == $sidebarpos ){
		$containerclass = 'large-12 wishbone_no-sidebar';
	} else {
		$containerclass = 'large-8';
	}

	?>

	<!-- ===================================
	CONTENT AREA
	===================================== -->
	<div class="wishbone_maincontainer">
		<div class="row">
			
			<?php if( 'left-sidebar' == $sidebarpos ) get_sidebar(); ?>

			<div class="<?php echo esc_attr( $containerclass ); ?> column">
				<div class="wishbone_blogwrapper">
					<?php 
						if( have_posts() ): 
							
							wishbone_looptype( $postlayout ); 

							wishbone_paging_type( $pagingtype, $postlayout );
						endif;
					?>
				</div>
			</div> <!-- end .large-8 column -->

			<?php if( 'right-sidebar' == $sidebarpos ) get_sidebar(); ?>
			
			<div class="clear"></div>
		</div> <!-- end .row -->
		<div class="clear"></div>
	</div>
<?php get_footer(); ?>