Theme Check
[resolved] Preferance? comment_form or comments_template (3 posts)

  1. CreativeWP
    Posted 3 years ago #

    Hi again, my website uses

    <?php comments_template(); ?>

    But the validator prefers:

    <?php comment_form(); ?>

    If you do not mind, why?


  2. CreativeWP
    Posted 3 years ago #

    If I use <?php comment_form(); ?> comments disappear from the Theme. Any ideas?

  3. Samuel Wood (Otto)
    WordPress.org Tech Dude
    Plugin Author

    Posted 3 years ago #

    Those two functions do entirely different things. A theme should have both of them.

    The comment_template() function both loads the comments from the database and loads the comments.php file in the theme to display them.

    The comment_form() function displays the comment form. It would be located in the comments.php file.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic