<?php
/**
 * Template Name: Login
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages and that
 * other "pages" on your WordPress site will use a different template.
 *
 * @package WordPress
 * @subpackage Twenty_Fifteen
 * @since Twenty Fifteen 1.0
 */

get_header(); ?>
<?php
// Start the loop.
while ( have_posts() ) : the_post();

  // Include the page content template.
?>


<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>


	<h1 class="title"><?php echo h1_title(); ?></h1>
	

	<div class="entry-content">

		<?php

			if ( is_user_logged_in() ) { 
				the_content();
			 	
			}else{
				 $args = array(
				 	'redirect'	=> site_url( '/client-login/ ' ),
				 );
				 echo "<hr/>";
				 wp_login_form( $args  ); 
			}

		?> 
	</div><!-- .entry-content -->

</article><!-- #post-## -->


<?php

// End the loop.
endwhile;
?>
<?php get_footer(); ?>
