New Landing How can we help? Themeforest Theme Support Dante Comments on Password Protected Pages

Viewing 2 posts - 1 through 2 (of 2 total)
  • Posted in: Dante
  • #182494
    wochurch
    Member
    Post count: 55

    I have created a password-protected page here:
    http://www.wochurch.org/get-connected/volunteer-login/cq-volunteer-team/

    I would like to have a comments section on that page. But when I view the page, it says “This post is password protected. Enter the password to view any comments.” Do you know how I can make this show up?

    #182646
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please open to edit comments.php file.
    Find this code:-

    ?>
    	<div id="comments">
    	<?php
    	    $req = get_option('require_name_email'); // Checks if fields are required.
    	    if ( 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']) )
    	        die ( 'Please do not load this page directly. Thanks!' );
    	    if ( ! empty($post->post_password) ) :
    	        if ( $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password ) :
    	?>
    		<div class="nopassword"><?php _e("This post is password protected. Enter the password to view any comments.", "swiftframework"); ?></div>
    	</div><!-- .comments -->
    	<?php
    	        return;
    	    endif;
    	endif;

    Change with:-

    ?>
    	<div id="comments">
    	<?php
    	    $req = get_option('require_name_email'); // Checks if fields are required.
    	    if ( 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']) )
    	        die ( 'Please do not load this page directly. Thanks!' );

    Thanks
    Mohammad

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register