<?php get_header()?>

<?php $title_type = kktfwp_title_type(); ?>

<?php if ( post_password_required( $post ) ) { 

		get_template_part( 'password-form' );
		
	} else { ?>

	<!-- start main container -->
	<div class="content page-content">
		
		<?php if( $title_type == 'parallax' ) : ?>
		
			<div id="kk-parallax-wrapper" class="kk-parallax-wrapper">
				
				<?php echo kktfwp_parallax(); ?>

				<div id="kk-parallax-title-wrapper" class="kk-parallax-title-wrapper">
					<div id="kk-parallax-title" class="page-title">
						<?php $source = rwmb_meta( 'kk_customTitle', false, kktfwp_postid() );						
						if ( $source ) : ?>						
							<?php echo wp_kses( rwmb_meta( 'kk_customdescription', false, kktfwp_postid()), kktfwp_kses_allowed_args()) ?>						
						<?php else: ?>					
							<?php the_title( '<h1>', '</h1>' ); ?>						
						<?php endif; ?>
					</div>	
				</div>	
				
				<a id="kk-down" class="kk-down is-loading" href="#kk-to-me"></a>
			
			</div>	

		<?php endif; ?>
			
		<div class="content-inner-wrapper clearfix">
			<span id="kk-to-me"></span>			
			<?php if( $title_type == 'default' ) : ?>
			
				<div class="page-title">
					<?php the_title ('<h1>', '</h1>'); ?>
				</div>	

				<div class="divider clear"></div>	
				
			<?php endif; ?>
			
			<div class="inner-content">
				<?php the_post(); ?>
				
				<?php the_content (); ?>
				
				<?php 
				wp_link_pages( array(
					'before'      => '<div class="page-links"><span class="page-links-title">' . esc_html__( 'Pages:', 'toppic' ) . '</span>',
					'after'       => '</div>',
					'link_before' => '<span>',
					'link_after'  => '</span>',
					'pagelink'    => '<span class="screen-reader-text">' . esc_html__( 'Page', 'toppic' ) . ' </span>%',
					'separator'   => '<span class="screen-reader-text">, </span>',
				) );
				?>
			</div>
					
		</div>
		
		<?php get_template_part('extends/footer-area') ?>
		
	</div>
	<!-- end container -->
<?php } ?>	

<?php get_footer()?>