<?php get_header(); global $gp; ?>

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>		
		
	<?php gp_page_header( get_the_ID() ); ?>
				
	<div id="content-wrapper"<?php if ( $GLOBALS['gp_layout'] != 'gp-fullwidth' ) { ?> class="gp-container"<?php } ?>>

		<div id="content">

			<article <?php post_class( 'post-content' ); ?>>

				<?php if ( get_post_meta( $post->post_parent, '_wp_page_template', true ) == 'hub-template.php' ) { ?>
					<header class="entry-header small-header">
						<h2 class="entry-title"><?php echo gp_prefix_hub_title( get_the_ID() ); ?></h2>
					</header>
				<?php } ?>	
		
				<div class="entry-content">

					<?php if ( has_post_thumbnail() && $GLOBALS['gp_featured_image'] == 'enabled' ) { ?>

						<div class="post-thumbnail featured-content <?php echo sanitize_html_class( $GLOBALS['gp_image_alignment'] ); ?>">

							<?php $image = aq_resize( wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) ), $GLOBALS['gp_image_width'], $GLOBALS['gp_image_height'], $GLOBALS['gp_hard_crop'], false, true ); ?>
							<?php if ( $gp['retina'] == 'gp-retina' ) {
								$retina = aq_resize( wp_get_attachment_url( get_post_thumbnail_id( get_the_ID() ) ), $GLOBALS['gp_image_width'] * 2, $GLOBALS['gp_image_height'] * 2, $GLOBALS['gp_hard_crop'], true, true );
							} else {
								$retina = '';
							} ?>

							<img src="<?php echo esc_url( $image[0] ); ?>" data-rel="<?php echo esc_url( $retina ); ?>" width="<?php echo absint( $image[1] ); ?>" height="<?php echo absint( $image[2] ); ?>" alt="<?php if ( get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true ) ) { echo get_post_meta( get_post_thumbnail_id(), '_wp_attachment_image_alt', true ); } else { the_title_attribute(); } ?>" class="wp-post-image" />
		
						</div>

					<?php } ?>
	
					<div class="post-item-content <?php if ( isset( $GLOBALS['gp_image_alignment'] ) ) { echo sanitize_html_class( $GLOBALS['gp_image_alignment'] ); } ?>"><?php the_content(); ?></div>
		
					<?php wp_link_pages( 'before=<ul class="page-numbers single-nav">&pagelink=<span class="page-numbers">%</span>&after=</ul>' ); ?>		
			
				</div><!-- END ENTRY CONTENT -->
			
				<?php if ( $gp['page_author_info'] == 'enabled' ) { ?>
					<?php get_template_part( 'lib/sections/author', 'info' ); ?>
				<?php } ?>

			</article><!-- END ARTICLE -->	

		</div><!-- END CONTENT -->

		<?php get_sidebar(); ?>

	</div><!-- END CONTENT WRAPPER -->

		
<?php endwhile; endif; ?>		
			
<?php get_footer(); ?>
<!-- 20script SEO Starts - http://www.20script.ir/ -->