<?php
/**
 * The template for displaying all single posts
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
 *
 * @package WordPress
 * @subpackage Twenty_Seventeen
 * @since 1.0
 * @version 1.0
 */

get_header(); ?>

<div class="en_copy clearfix">
			<p><?php 
				$cat = get_the_category();
				$cat = $cat[0];
				echo $cat->cat_name;
			 ?></p>
		<!-- en_copy --></div>	
<div id="contents">

<article id="main">
	<section class="clearfix">
		<?php
			if(have_posts()): while(have_posts()):
				the_post();
		?>
	
		<h3><?php the_title(); ?></h3>
		<p>
		<?php
				the_content();
			endwhile;
			endif;
		?>
		</p>
	</section>
<?php if (is_user_logged_in()) {
		get_sidebar();
	} else {
	}?>
	<p id="pageTop"><a data-scroll href="#header"><br>page top</a></p>
</article>
<!-- contents --></div>

<?php get_footer(); ?>
