• Hi all,

    I have done a far bit of research on this before posting and I see that there are a fair few people with the same problem but I can’t seem to find an actual solution and its something that is really important to my website functionality so I’m here to ask anyone if they have any advice.

    So its so the login is working for the password protected pages and posts and its showing how many comments but not the comments themselves.
    It instead comes up with “This post is password protected. Enter the password to view comments.” and this is before and after the password has been put in.
    On the code side under the theme-compat file I can find comments.php and I believe this code to be the code that needs editing I’m just not sure what to do exactly:

    [ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]

    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 class="nocomments"><?php _e('This post is password protected. Enter the password to view comments.'); ?></p>
    	<?php
    		return;
    	}
    ?>

    As I say any help would be very much appreciated.
    Thank you

  • The topic ‘Password Protected Posts AND Pages Comments content not showing’ is closed to new replies.