<?php 
/**
 * Archive Template
 *
 *
 * @package Swedish Greys
 * @subpackage Template
 */
 
get_header(); ?>
<?php /* Get author data */
	if(get_query_var('author_name')) :
	$curauth = get_userdatabylogin(get_query_var('author_name'));
	else :
	$curauth = get_userdata(get_query_var('author'));
	endif;
?>
		<div id="container">
 
			<div id="content">
			
			<h1 class="page-title">
			<?php if ( is_day() ) : ?>
				<?php printf( __( 'Daily archives: <span>%s</span>', 'ntp_framework' ), get_the_date() ); ?>
			<?php elseif ( is_month() ) : ?>
				<?php printf( __( 'Monthly archives: <span>%s</span>', 'ntp_framework' ), get_the_date('F Y') ); ?>
			<?php elseif ( is_year() ) : ?>
				<?php printf( __( 'Yearly archives: <span>%s</span>', 'ntp_framework' ), get_the_date('Y') ); ?>
			<?php elseif ( is_category() ) : ?>
				<?php printf( __( 'Archive for %s', 'ntp_framework' ), '<span>' . single_cat_title( '', false ) . '</span>' ); ?>
			<?php elseif ( is_tag() ) : ?>
				<?php printf( __( 'Tag archives for %s', 'ntp_framework' ), '<span>' . single_tag_title( '', false ) . '</span>' ); ?>
			<?php elseif ( is_author() ) : ?>
			<?php printf( __( 'All posts by %s', 'ntp_framework' ), '<span>' . $curauth->display_name . '</span>' ); ?>
				

			<?php else : ?>
				<?php _e( 'Archive', 'ntp_framework' ); ?>
			<?php endif; ?>
			</h1>

			<?php
			/* Run the loop to output the posts.
			 * If you want to overload this in a child theme then include a file
			 * called loop-archive.php and that will be used instead.
			 */
			 get_template_part( 'loop', 'archive' );
			?>
			
			</div><!-- #content -->
   
		</div><!-- #container -->
 
<?php get_sidebar(); ?>		
<?php get_footer(); ?>