0

I have been using wordpress for some time now. Recently, I tried to add comments to my pages but it did not work. I went to the pages>edit page>screen options>clicked discussion and comments>selected allow comments at the bottom>update, but it did not work. I am not sure if this has to do with the code(I am not an expert coder) or if this is a system problem, but I just want to add comments to my pages. Thanks.

and

if ( post_password_required( ) ) { return; } ?>

8
  • Please provide us with the code of your template file. This issue can be caused by dozens of reasons and we can not help you without a code/error log.
    – Johansson
    Commented Jan 19, 2017 at 17:44
  • Hi Sasan J., thanks for the response. Are you asking for the code of the page? In the page editor next to visual, it says text which contains the code for that page. Is that what you need to see?
    – user111303
    Commented Jan 19, 2017 at 19:40
  • Hello, in the admin panel go to Appearance > Editor and then select single.php from the right side. You can copy the code associated with the comments from there. Also if there is a comments.php in the right side, you might want to add that code to your question too, since we need to see what code is generating the comments. However i noticed that you mentioned Page in the question's title. If you mean you the single pages not posts, you must search for the proper page template instead of single.php.
    – Johansson
    Commented Jan 19, 2017 at 20:20
  • Hi, just like to start off with thanks for your cooperation. My site has a posts page and a regular page. I want to add the comments to the page not post to clarify. Single.php template:<?php /** * The template for displaying all single posts. * * @package BoldGrid */ ?> <?php get_template_part( 'templates/content-single', get_post_type() );?>
    – user111303
    Commented Jan 19, 2017 at 21:17
  • Comments.php template:<?php /** * The template for displaying comments. * * The area of the page that contains both current comments * and the comment form. * * @package BoldGrid */ if ( post_password_required( ) ) { return; } ?> <section id="comments" class="comments"> <?php do_action( 'boldgrid_comments_before' ) ?> <?php do_action( 'boldgrid_comments' ) ?> <?php do_action( 'boldgrid_comments_after' ) ?> </section>
    – user111303
    Commented Jan 19, 2017 at 21:19

1 Answer 1

0

Check discussion is enable in settings. Go to Settings-> Discussion and check Default article settings->Allow people to post comments on new articles

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.