How to properly enable comments form in page template

Question

I’ve applied the following code to enable the comment section in the page template.

<div class="col-md-12">
                <?php while ( have_posts() ) : the_post(); ?>
                    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                        <div class="sec-text wow fadeInUp" data-wow-delay="300ms" data-wow-duration="1000ms">
                            <?php the_content(); ?>
                        </div>
                    </article>
            <div class="col-md-8">
                <?php
                if ( comments_open() || get_comments_number() ) :
                    comments_template();
                endif;
                ?>
            </div>
            <?php endwhile; wp_reset_query();?>
            </div>

The comment form is showing directly by this code. User can not able to disable or re-enable the comment form in editor for specific page.

--------------------------------------------------

>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="https://www.wptricks.com/question/how-to-properly-enable-comments-form-in-page-template/">

How to properly enable comments form in page template</a>
0
, , Md Jwel Miah 4 years 0 Answers 25 views 0

Leave an answer