Comments not working
-
Updated to the latest and greatest and comments stopped working. They are posting OK, I can get a comment number but it seems that comments themselves don’t work.
you can see this here:
4 comments on this page not showing upHere’s my code on comments.php
<!– below code from comments.php –>
<?php
if (‘comments.php’ == basename($_SERVER[‘SCRIPT_FILENAME’]))
die (‘Please do not load this page directly. Thanks!’);if (!empty($post->post_password) && $_COOKIE[“wp-postpass_” . COOKIEHASH] != $post->post_password) :
print “You need to enter your password to view comments!”;
return;
endif;print “<div class=\”commentbody\”>”.chr(13);
print “”;if (pings_open()) :
?>
” rel=”trackback”><?php “Here’s this post’s TrackBack URI.”; ?>
<?phpendif;
print “”;
print “</div>”.chr(13);if ($comments) :
print “<h3 id=\”comments\”>”.comments_number(‘No Responses’, ‘One Response’, ‘% Responses’ ).” to “”.the_title().””</h3>”;
foreach ($comments as $comment) :
?>
<div class=”entry”>
<h3></h3>
<p class=”desc” id=”comment-<?php comment_ID() ?>”><?php comment_text() ?>
<p class=”meta”>
<?php comment_type(“Comment”, “Trackback”, “Pingback”); ?> by <?php comment_author_link() ?>, <?php comment_date() ?> @ “><?php comment_time() ?> <?php edit_comment_link(“Edit This”, ” • “); ?>
</div>
<?php
endforeach;
else :
print “<div class=\”commenttitle\”>No comments yet!!</div>”.chr(13);
endif;if (comments_open()) :
?>
<div class=”commenttitle” id=”postcomment”>Leave a comment</div>
<div class=”commentbody”>
<?php
if (get_option(“comment_registration”) && !$user_ID) :
?>
You must be /wp-login.php?redirect_to=<?php the_permalink(); ?>”>logged in to post a comment.
<?php
else :
?>
<form action=”<?php echo get_option(“siteurl”); ?>/wp-comments-post.php” method=”post” id=”commentform”>
<?php
if ($user_ID) :
?>
You are currently logged in as /wp-admin/profile.php”><?php echo $user_identity; ?>. (Not you? Either use this chance to steal their identity or /wp-login.php?action=logout” title=”Log out of this account”>log out!)
<?php
else :
?>
<label for=”author”>Name <?php if ($req) echo “(required)”; ?>:</label>
<input type=”text” name=”author” id=”author” value=”<?php echo $comment_author; ?>” size=”22″ />
<label for=”email”>E-mail address (will not be published) <?php if ($req) echo “(required)”; ?>:</label>
<input type=”text” name=”email” id=”email” value=”<?php echo $comment_author_email; ?>” size=”22″ />
<label for=”url”>Website (if applicable):</label>
<input type=”text” name=”url” id=”url” value=”<?php echo $comment_author_url; ?>” size=”22″ />
<?php
endif;
?>
<textarea name=”comment” id=”comment” cols=”40″ rows=”10″></textarea><input type=”submit” value=”Submit Comment” />
<input type=”reset” value=”Destroy All Evidence” />
<input type=”hidden” name=”comment_post_ID” value=”<?php echo $id; ?>” /><?php
do_action(“comment_form”, $post->ID);
?>
</form>
<?php
endif;
else :
print “Sorry, the comment form is closed at this time.”.chr(13);
endif;print “</div>”.chr(13);
?>
<!– above code from comments.php –>
- The topic ‘Comments not working’ is closed to new replies.