導讀:comments_template 標籤是方便我們在 WordPress 網站中調用評論文件 comments.php 的, 如果在主題當中沒有 comments.php 文件, 標籤會自動獲取程序路...
<?php comments_template( $file, $separate_comments ); ?> 其中的 $file 參數是指可以導入不同的評論文件的, 例如: 我們在主題中創建一個 comments-other.php 文件, 我們可以通過以下代碼進行調用:
<?php comments_template( '/comments-other.php' ); ?>