WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. CreativeWP
    Member
    Posted 1 year ago #

    Hi again, my website uses

    <?php comments_template(); ?>

    But the validator prefers:

    <?php comment_form(); ?>

    If you do not mind, why?

    http://wordpress.org/extend/plugins/theme-check/

  2. CreativeWP
    Member
    Posted 1 year ago #

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

  3. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 1 year 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