show % comments for pw-protected post instead of 'enter your password to view..' (1 post)

  1. iso-100
    Posted 8 years ago #

    I'm so close to figuring this out, but I'm just stuck..

    I'm been trying to edit this portion of the comment-template.php

    if ( !empty($post->post_password) ) {
    		if ($_COOKIE['wp-postpass_'. COOKIEHASH] != $post->post_password) {
    			echo(__('Enter your password to view comments'));

    so that the 'Enter your password to view comments' part would be changed to the format on public posts, using this code

    <?php comments_popup_link(__('No Comment'), __('1 Comment'), __('% Comments'), 'commentslink', __('Comments are off')); ?>

    It hasn't worked out for me.

    Don't know if this matters, but for my pw-protected posts, I have an intro then it is cut off by the <more> asking for a password to see the rest of the post.

    I'd still like to have people who don't know the password to be able to comment.

    So yes, I'd like to comments in my password protected posts to be made public. Hope I make sense.

    If anyone can help me with this, it'll be awesome!! Thanks in advanced!

Topic Closed

This topic has been closed to new replies.

About this Topic