• サイトデザイン工事中です。ご意見をお寄せください
  • 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細

このWikiはいつでも誰でも編集できます

インクルードタグ/comments template

提供:WordPress Codex 日本語版
移動: 案内, 検索

このページ「インクルードタグ/comments template」は未翻訳です。和訳や日本語情報を加筆してくださる協力者を求めています

情報募集中 このインクルードタグの説明やコードの書き方、活用例参考になるページがあったら、他のWordPressユーザのためにどんどん書き込みましょう! 該当部分を編集するか、このページのノートまたはフォーラム等で教えてください。

目次

説明

Loads the comment template. For use in single post and Page displays.

書き方

<?php comments_template( $file, $separate_comments ); ?>

パラメータ

$file
string) (optional) The file to load
初期値: /comments.php
$separate_comments
boolean) (optional) Whether to separate the comments by comment type.
初期値: false

用例

Alternative Comment 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' ); ?> 

Notes

Changelog

Since: 1.5.0

Source File

comments_template() is located in wp-includes/comment-template.php.

最新英語版: WordPress Codex » Function Reference/comments_template最新版との差分

関連項目

インクルードタグ: get_header, get_footer, get_sidebar, get_template_part, get_search_form, comments_template


外部資料

個人用ツール
名前空間
変種
操作
このサイトについて
特集
サーバ別情報
リファレンス
ドキュメント整備
ツールボックス
他の言語