0

フォト ギャラリーといくつかのチュートリアル ビデオ ページにコメント エリアがある wordpress を使用して Web サイトを開発しています。ログインしていないユーザーがコメントを投稿したり、ビデオ ページにアクセスしたりするのを制限するにはどうすればよいですか? まだGoogleをたくさん持っていますが、私の問題に関連する解決策はありませんでした. すでに多くのプラグインを検索しましたが、役に立ちませんでした。登録には、パイ登録プラグインを使用しています。ワードプレスのテーマは放物線です。テーマフォルダーのcomment.phpファイルにいくつかの変更を加えようとしました:

<?php
    /**
     * The template for displaying Comments.
     *
     * The area of the page that contains both current comments
     * and the comment form. The actual display of comments is
     * handled by a callback to tc_comment_callback()
     *
     * @package Customizr
     * @since Customizr 1.0
     */

    /*
     * If the current post is protected by a password and
     * the visitor has not yet entered the password we will
     * return early without loading the comments.
     */
     if ( have_comments() )
         echo apply_filters( 'tc_comment_separator', '<hr class="featurette-divider '. current_filter() .'">' );
?>

     <div id="comments" class="<?php echo apply_filters( 'tc_comments_wrapper_class' , 'comments-area' ) ?>" >
<?php 
     if( is_user_logged_in() )
     {
         comment_form( array( 'title_reply' => __( 'Leave a Comment' , 'customizr' ) ) );
         if ( have_comments() )
         do_action ( '__comment' );
      }
?>
    </div><!-- #comments .comments-area -->
4

1 に答える 1