Basic wordpress loop

<?php 
if ( have_posts() ) {
    while ( have_posts() ) {
        the_post(); 
        //
        // Post Content here
        //
    } // end while
} else {
    esc_html_e( 'Sorry, no posts to show.' );
}
?>