Codex tools: Log in
Languages: English • 日本語 • Português do Brasil • (Add your language)
Contents |
Loads the comment template. For use in single Post and Page displays. Will not work outside of single displays unless $withcomments is set to "1".
<?php comments_template( $file, $separate_comments ); ?>
Default Usage
<?php comments_template(); ?>
On some occasions you may want display your comments differently within your Theme. For this you would build an alternate file (ex. short-comments.php) and call it as follows:
<?php comments_template( '/short-comments.php' ); ?>
Since: 1.5.0
comments_template() is located in wp-includes/comment-template.php.
List of comment filters and actions
Include Tags: get_header(), get_footer(), get_sidebar(), get_template_part(), get_search_form(), comments_template()