<?php get_header(); ?>
	<section id="content" class="site-content">
		<div id="primary">
			<div id="primary-inner">

				<div id="main-content">
					<div class="main-content-header">
						<h2 class="main-content-title">
							<?php
								if ( is_category() ) :
									printf( __( 'دسته بندی : %s', 'dw-gamez' ), '<span>' . single_cat_title("", false) . '</span>' );

								elseif ( is_tag() ) :
									
									printf( __( 'تگ : %s', 'dw-gamez' ), '<span>' . single_tag_title("", false) . '</span>' );

								elseif ( is_author() ) :
									/* Queue the first post, that way we know
									 * what author we're dealing with (if that is the case).
									*/
									the_post();
									printf( __( 'نویسنده : %s', 'dw-gamez' ), '<span class="vcard">' . get_the_author() . '</span>' );
									/* Since we called the_post() above, we need to
									 * rewind the loop back to the beginning that way
									 * we can run the loop properly, in full.
									 */
									rewind_posts();

								elseif ( is_day() ) :
									printf( __( 'روز : %s', 'dw-gamez' ), '<span>' . get_the_date() . '</span>' );

								elseif ( is_month() ) :
									printf( __( 'ماه : %s', 'dw-gamez' ), '<span>' . get_the_date( 'F Y' ) . '</span>' );

								elseif ( is_year() ) :
									printf( __( 'سال : %s', 'dw-gamez' ), '<span>' . get_the_date( 'Y' ) . '</span>' );

								elseif ( is_tax( 'post_format', 'post-format-aside' ) ) :
									_e( 'Asides', 'dw-gamez' );

								elseif ( is_tax( 'post_format', 'post-format-image' ) ) :
									_e( 'Images', 'dw-gamez');

								elseif ( is_tax( 'post_format', 'post-format-video' ) ) :
									_e( 'Videos', 'dw-gamez' );

								elseif ( is_tax( 'post_format', 'post-format-quote' ) ) :
									_e( 'Quotes', 'dw-gamez' );

								elseif ( is_tax( 'post_format', 'post-format-link' ) ) :
									_e( 'Links', 'dw-gamez' );

								else :
									_e( 'Archives', 'dw-gamez' );

								endif;
							?>
						</h2>
						<?php dw_gamez_change_layout(); ?>
					</div>

					<?php
						// Show an optional term description.
						$term_description = term_description();
						if ( ! empty( $term_description ) ) :
							printf( '<div class="taxonomy-description">%s</div>', $term_description );
						endif;
					?>
					
					<div class="layout-<?php echo dw_gamez_get_layout(); ?>">
					<?php if ( have_posts() ) : ?>

						<?php while ( have_posts() ) : the_post(); ?>

							<?php get_template_part( 'content', get_post_format() ); ?>

						<?php endwhile; ?>

						<?php dw_gamez_pagenavi( '<i class="icon-angle-left"></i>', '<i class="icon-angle-right"></i>' ); ?>

					<?php else : ?>

						<?php get_template_part( 'no-results', 'index' ); ?>

					<?php endif; ?>
					</div>
				</div>

			</div>
		</div>
		<?php get_sidebar(); ?>
	</section>

<?php get_footer(); ?>
