<?php
/* Template Name: Custom Lockdown */
/**
 * The template for displaying pages
 *
 * 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_Sixteen
 * @since Twenty Sixteen 1.0
 */
if (is_front_page() && (is_user_logged_in())) {
	//echo "<script>alert('home');</script>";
	$redirect_url = get_permalink( 4 );
	wp_redirect( $redirect_url );
	exit;
}
get_header(); ?>
<?php

?>
<div id="primary" class="content-area">
	<main id="main" class="site-main" role="main">
		<?php
		// Start the loop.
		while ( have_posts() ) : the_post();

			// Include the page content template.
			get_template_part( 'template-parts/content', 'login' );
		?>

			<!--<div id="my-custom-login">
				<h2><?php /*_e( 'Login Here', 'buddypress' ) */?></h2>
				<?php /*wp_login_form(); */?>
				<a href="<?php /*echo wp_lostpassword_url( get_permalink() ); */?>" title="Lost Password">Lost Your Password?</a>
			</div>-->

		<?php
			// End of the loop.
		endwhile;
		?>

	</main><!-- .site-main -->

	<?php // get_sidebar( 'content-bottom' ); ?>

</div><!-- .content-area -->

<?php get_footer(); ?>
