Hello! I'm developing a theme and my form in comments.php is giving error. The rest of the comments file is working right. I am following the book "How To Be a Rockstar Wordpress Designer" as a reference and have copied the code in full. Here is the code:
<?php if ($post->comment_status == 'open') : ?>
<h3>Deixe seu comentário</h3>
<?php if (get_option('comment_registration') && !$user_ID) : ?>
<p>You must be <a href="<?php bloginfo('url');?>/wp-login.php?redirect_to=<?php the_permanentlink();?>">looged in</a> to post a comment.</p>
<?php else : ?>
<form action="<?php bloginfo('url');?>/wp-comments-post.php" method="post" class="comment-form">
<?php if ( $user_ID) : ?>
<h4>Logged in as<a href="<?php echo get_option('siteurl');?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>
<a href="<?php echo get_option('siteurl');?>/wp-login.php?action=logout" title="Log out of this account">Logout</a>
</h4>
<?php else : ?>
<input type="text" name="author" id="author" value="<?php echo $comment_author; ?>"/>
<label for="author"><small>bane <?php if ($req) echo "(required)"; ?></small></label>
<input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>"/>
<label for="email"><small>Mail (will not be published)<?php if ($req) echo "(required)"?></small></label>
<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>"/>
<label for="url"><small>Website</small></label>
<?php endif; ?>
<textarea name="comment" id="data" cols="60" rows="7" tabindex="4"></textarea>
<input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment"/>
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
<?php do_action('comment_form', $post->ID); ?>
</form> <?php endif; ?>
Thank you in advance.
I'm adding an image to illustrate the error, as suggested in the comments: