No Comments Except for Logged In Users
-
So, my blog phoenixrealm.com is not taking any comments except those from logged in users. The option for that is not checked, so I don’t know whats going on. I upgraded from 2.0.2 to 2.0.4 to try to fix it, but that did not happen. No errors, no settings that look like they need to be changed. Turned off Akismet to see if that’d fix it…no luck. No other comment moderation plugins or systems. Help!?
-
Did it ever work for you? Since what wp version did it stop working?
Did you try to remove your htaccess file and reverting back to the default permalink structure?
Just to rule out (or prove) – htaccess plays a role in this.I’m having the same problem with version 2.1. Logged in users see the comments fine – but if you’re not logged in the comments don’t show. I can’t figure out how to fix it.
Do you have bad-behavior or spam karma? Do you have any plugins that alter comment behavior. I once had a problem like this and i had to change a plugin setting.
I have no plugins activated except sidebar widgets and wp flickr widgets. What’s bad-behavior and spam karma? This is a new (today) install so if it didn’t come bundled with 2.1 I don’t have it, with the exception of the two plugins I mentioned.
I’m wondering if it might be the theme I’m using – Blue Zinfandel Squared Enhanced 2.0. Here (hopefully) is the code for the comments.php file:
<?php // Do not delete these lines
if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');
if (!empty($post->post_password)) { // if there's a password
if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie
?>
<p class="nocomments">
<?php _e("This post is password protected. Enter the password to view comments."); ?>
<p>
<?php
return;
}
}
/* This variable is for alternating comment background */
$oddcomment = 'alt';
?>
<div id="commentblock">
<!--comments form -->
<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment. </p>
<?php else : ?><!--comments area-->
<?php if ($comments) : ?>
<p><?php comments_number(__('No Comment'), __('1 Comment so far'), __('% Comments so far')); ?></p>
<ol id="commentlist">
<?php foreach ($comments as $comment) : ?>
<li class="<?php echo $oddcomment; ?>" id="comment-<?php comment_ID() ?>">
<?php comment_author_link()?> on
<?php comment_date('F j, Y') ?>
<?php comment_time()?>
<?php edit_comment_link(__("Edit This"), ''); ?>
<?php if ($comment->comment_approved == '0') : ?>
<em>Your comment is awaiting moderation.</em>
<?php endif; ?>
<?php
if(the_author('', false) == get_comment_author())
echo "<div class='commenttext-admin'>";
else
echo "<div class='commenttext'>";
comment_text();
echo "</div>";?>
</li>
<?php /* Changes every other comment to a different class */
if ('alt' == $oddcomment){
$oddcomment = 'standard';
}
else {
$oddcomment = 'alt';
}
?>
<?php endforeach; /* end for each comment */ ?>
</ol>
<?php else : // this is displayed if there are no comments so far ?>
<?php if ('open' == $post-> comment_status) : ?>
<!-- If comments are open, but there are no comments. -->
<?php else : // comments are closed ?>
<!-- If comments are closed. -->
<p class="nocomments">Comments are closed.</p>
<?php endif; ?>
<?php endif; ?>
<?php /* if ('open' == $post-> comment_status) : */ ?>
<?php /* endif; // If registration required and not logged in */ ?>
<?php endif; // if you delete this the sky will fall on your head ?><div id="commentsform">
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php if ( $user_ID ) : ?><p>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="<?php _e('Log out of this account') ?>"> Logout » </a> </p>
<?php else : ?><p><?php _e('Name ');?><?php if ($req) _e('(required)'); ?><br />
<input type="text" name="author" id="s1" value="<?php echo $comment_author; ?>" size="30" tabindex="1" />
</p><p><?php _e('Email ');?><?php if ($req) _e('(required)'); ?><br />
<input type="text" name="email" id="s2" value="<?php echo $comment_author_email; ?>" size="30" tabindex="2" />
</p><p><?php _e('Website');?><br />
<input type="text" name="url" id="s3" value="<?php echo $comment_author_url; ?>" size="30" tabindex="3" />
</p><?php endif; ?>
<!--<p>XHTML:</strong> You can use these tags: <?php echo allowed_tags(); ?></p>-->
<p><?php _e('Speak your mind');?><br />
<textarea name="comment" id="s4" cols="90" rows="10" tabindex="4"></textarea>
</p><p>
<input name="submit" type="submit" id="hbutt" tabindex="5" value="Submit Comment" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
</p>
<?php do_action('comment_form', $post->ID); ?>
</form>
</div>
</div>Spam karma and Bad behavior are plugins that help keep down spam. Im new to php so im not that sure if anythings wrong with the code.
However
In Options, In discussion. IN “Before a comment appears:”
Is any box ticked beyond
“Comment author must fill out name and email”If the other two are ticked they might be causing the problem.
No, none of them are ticked. I tried checking author must fill out name and email but that didn’t change it either.
Ok.
You can see them in your manage comments? But not on the blog?Did you check if they are all being held for moderation? If so they wont appear till you have said they are ok.
(you might have in Options > Discussion > Before a comment appears: And administrator must approve the comment. In which case you would have to ok all the comments)
After that you could check your blacklist, maybe it has common words listed.
I don’t have it set to administrator must approve the comment. I don’t have any words in my blacklist. Any logged in user can see the comments on the blog – not just administrators, but if you’re not logged in, you can’t see them.
I installed WordPress last night at https://php.basicsyntax.com. I have the same issue. I’d like people to be able to post anonymously.
Here is my configuration:
– Options -> Discussions
– – Allow people to post comments on the article (checked)
– – An administrator must approve the comment (UNchecked)
– – Comment author must fill out name and e-mail (UNchecked)
– – Comment author must have a previously approved comment (UNchecked)When I click the “post a comment” link it says “You must be logged in to post a comment.” which is what I want to eliminate.
Any thoughts to fix this are appreciated.
Just to clarify, that’s not the same issue. My issue is that visitors can’t even READ the comments that logged in users have left.
I am having the same problem on my installed of word press as PraveenC1. nobody can leave a comment without logging in. I would like everyone to be able to post a comment if they so desire.
Any help would be appreciated. https://www.lymanuniverse.com is the url.
I am using MistyLook 3.3.1 theme.
Thanks
OK I think I was able to find the solution.
Under Options > General tab in the admin there is a setting for membership. In my install the option for “Users must be registered and logged in to comment” was selected by default. I simply unchecked the box and now people can comment and see comments.
Hope this helps everyone.
- The topic ‘No Comments Except for Logged In Users’ is closed to new replies.