I have been trying to find the solution to this: Parse error: syntax error, unexpected $end, which says it is on line 68. Line 68 is the last line. I have given up with finding the solution to the error, so could someone please help me with this? Thanks in advance.
<?php
/*
Template Name: Comments
*/
?>
<?php
// Do not delete these lines
if (!empty($_SERVER['SCRIPT_FILENAME']) &&
'comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) {
die ('Please do not load this page directly. Thanks!');
}
if ( post_password_required() ) { ?>
<p>This post is password protected.
Enter the password to view comments.</p>
return;
}
?>
<!-- Display the comments -->
<?php function alternate_rows($i) {
if ($i % 2) :
echo ' class="alt"';
else :
?>
<?php if ($comments) : ?>
<ol class="commentlist">
<?php foreach ($comments as $comment) : ?>
<?php $i++; ?>
<li<?php alternate_rows($i); ?> id="comment-<?php comment_ID(); ?>">
<li class="<?php if (comment_author_email == "mail@the-ultimate-website-blog.com") { echo 'author'; } else { echo $oddcomment; } ?> item" id="comment-">
<?php if ($comment->comment_approved == '0') : ?>
<p>Your comment is awaiting approval.</p>
<?php endif; ?>
<cite><?php comment_type(); ?> by <?php comment_author_link(); ?> on <?php comment_date(); ?> at <?php comment_time(); ?></cite>
<?php comment_text(); ?>
</li>
</li>
<?php endforeach; ?>
</ol>
<?php else : ?>
<p>No comments yet.</p>
<?php endif; ?>
<?php endif; ?>
<?php } ?>
<!-- Display the comment form -->
<?php if (comments_open()) : ?>
<br /><br />
<?php comment_form(); ?>
<?php else : ?>
<?php echo 'Comments are closed.'; ?>
<?php endif; ?>