Ok so starting at line 87:
<?php
if ( have_posts() )
while ( have_posts() ) : the_post(); ?>
That’s called “the loop”. It’s looking to see if there are any posts, and if so loop through each one and display it. So you’d replace that bit with the code I showed you. It’s starts with the “if (have_posts)” part, but I don’t actually see where it ends that if statement…let us know if, after you replace the code, it throws an error. Something like “unexpected endif”.
I’ll see if I can modify the pastebin code for you…
Oh and you don’t need that <html> tag towards the top of your page template. The get_header call should pull in your header.php file which should already have that.