<?php
/**
 * The main template file.
 * 
 * This is the most generic template file in a WordPress theme
 * and one of the two required files for a theme (the other being style.css).
 * It is used to display a page when nothing more specific matches a query.
 * E.g., it puts together the home page when no home.php file exists.
 * Learn more: http://codex.wordpress.org/Template_Hierarchy
 * 
 * @package codemaster
 */
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}
get_header(); ?>
<section class="pagecontent py-3">
    <div class="container">
	<?php
	if ( have_posts() ) :
	    $i = 0;
	  while ( have_posts() ) : the_post(); $i++; ?>
	      <h2 class="display-5 my-3"><?php sanitize_title(the_title()) ?></h2>
	    <?php
	    if ( $i > 1 ) {
			echo '<hr class="styled-separator mt-2" />';
		}
		the_post_thumbnail(); 
	    wp_strip_all_tags(the_content()) ?>
	  <?php endwhile;
	else :
	  esc_html_e ('<p>There are no posts!</p>', 'codemaster');
	endif;
	?>
   </div>
</section>
<?php get_footer(); ?>