Hello. I try to add a comment form to the page template, however, for reasons that are not clear to me, it does not appear. I do not know why, because I seem to be doing everything right. Snippet file reviews.php :

<?php /* * Template Name: Reviews */ get_header(); ?> <div class="container page"> <h2>Отзывы</h2> <?php comments_template(); ?> <?php comment_form();?> </div> <?php get_footer(); ?> 

As a result, we have the output: output screenshot Those. no comments form under the comments themselves, but with the output of comments everything is ok. Please tell me why there is no form?

The structure of the custom-made Wordpress theme: topic structure

Well, just in case, the contents of the comments.php file:

  <?php if ( have_comments() ) : ?> <ol class="comment-list"> <?php wp_list_comments( array( 'style' => 'ol', 'short_ping' => true, 'avatar_size' => 74, ) ); ?> </ol><!-- .comment-list --> <?php // Are there comments to navigate through? if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : ?> <nav class="navigation comment-navigation" role="navigation"> <h1 class="screen-reader-text section-heading"><?php _e( 'Comment navigation', 'twentythirteen' ); ?></h1> <div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentythirteen' ) ); ?></div> <div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'twentythirteen' ) ); ?></div> </nav><!-- .comment-navigation --> <?php endif; // Check for comment navigation ?> <?php if ( ! comments_open() && get_comments_number() ) : ?> <?php endif; ?> <?php endif; // have_comments() ?> </div><!-- #comments --> 
  • Not sure, but is it related to the fact that the form is displayed only for authorized users? - Bookin
  • in this case, was authorized (the screen header is not entered). tried unauthorized - the same thing - Dmitry Shulga
  • Check the settings, perhaps the comments are simply disabled in the admin panel. Try calling the comment_form() function below the comments_template() if you are convinced that comments are allowed and the form is still not displayed - alenkins

0