WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Comments not showing up on password protected posts. :(

[Resolved] Comments not showing up on password protected posts. :(

  • Hello everyone!

    I have a wee problem. 🙁

    For some reason, my comments and comment form show up fine on a regular public post, however when I make the post password-protected, the comments or comments form do not show up at all, even when the password is entered.

    I don’t know how to fix it, I’ve got a little headache now after spending so long trying different methods, yet nothing has worked. 🙁 I spent the last hour trailing google and trying different things, so I figured I’d post here and hopefully someone may kindly help me out or know what I have to add/remove!

    Thanks for your time!

Viewing 4 replies - 1 through 4 (of 4 total)
  • And wouldn’t you know, I just fixed it! XD Very sorry, please ignore this post. *happy bunny* 🙂

    Do you know how? Because Comments not showing up on my site and also my old comments are gone

    I had to replace the top piece of my 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?>
    <?php
    return;
    }
    }
    ?>

    with

    <?php // Do not delete these lines
    if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
    die ('Please do not load this page directly. Thanks!');
    if ( post_password_required() ) { ?>
    		<p class="nocomments">Please enter password to view comments</p>
    	<?php
    		return;
    	}
    ?>

    This is what worked for me, anyway! 🙂

    Darn, this solution did not work for me! Digging around the Forums, I see that others are having this problem and it seems to be theme specific. When I revert back to the WordPress default theme, the comment box reappears and the problem is gone. I’m using the Fadonet Alien theme. I took a break from blogging for a year and a half, and the problem seems to have only happened since then because I’ve never had this problem before. My old comments are still visible, it’s just that no one can make comments now using this theme. Anyone?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Comments not showing up on password protected posts. :(’ is closed to new replies.
Skip to toolbar